Commit 37179c53 authored by Robert Knight's avatar Robert Knight

Convert src/annotator/test to ES modules

parent 77867094
const adder = require('../adder'); import * as adder from '../adder';
function rect(left, top, width, height) { function rect(left, top, width, height) {
return { left: left, top: top, width: width, height: height }; return { left: left, top: top, width: width, height: height };
......
const annotationCounts = require('../annotation-counts'); import annotationCounts from '../annotation-counts';
describe('annotationCounts', function() { describe('annotationCounts', function() {
let countEl1; let countEl1;
......
const EventEmitter = require('tiny-emitter'); import EventEmitter from 'tiny-emitter';
const AnnotationSync = require('../annotation-sync'); import AnnotationSync from '../annotation-sync';
describe('AnnotationSync', function() { describe('AnnotationSync', function() {
let createAnnotationSync; let createAnnotationSync;
......
const events = require('../../shared/bridge-events'); import events from '../../shared/bridge-events';
const features = require('../features'); import features from '../features';
const { $imports } = require('../features'); import { $imports } from '../features';
describe('features - annotation layer', function() { describe('features - annotation layer', function() {
let featureFlagsUpdateHandler; let featureFlagsUpdateHandler;
......
const rangeUtil = require('../range-util'); import * as rangeUtil from '../range-util';
function createRange(node, start, end) { function createRange(node, start, end) {
const range = node.ownerDocument.createRange(); const range = node.ownerDocument.createRange();
......
const observable = require('../util/observable'); import selections from '../selections';
const selections = require('../selections'); import * as observable from '../util/observable';
function FakeDocument() { function FakeDocument() {
const listeners = {}; const listeners = {};
......
const sidebarTrigger = require('../sidebar-trigger'); import sidebarTrigger from '../sidebar-trigger';
describe('sidebarTrigger', function() { describe('sidebarTrigger', function() {
let triggerEl1; let triggerEl1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment