add internals file and use it to organize imports
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
|
||||
import { runTests } from 'lib0/testing.js'
|
||||
import { isBrowser } from 'lib0/environment.js'
|
||||
import * as log from 'lib0/logging.js'
|
||||
import * as array from './y-array.tests.js'
|
||||
import * as map from './y-map.tests.js'
|
||||
import * as text from './y-text.tests.js'
|
||||
import * as xml from './y-xml.tests.js'
|
||||
|
||||
import { runTests } from 'lib0/testing.js'
|
||||
import { isBrowser } from 'lib0/environment.js'
|
||||
import * as log from 'lib0/logging.js'
|
||||
|
||||
if (isBrowser) {
|
||||
log.createVConsole(document.body)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
import * as Y from '../src/index.js'
|
||||
|
||||
import {
|
||||
createDeleteSetFromStructStore,
|
||||
getStates,
|
||||
AbstractItem,
|
||||
DeleteSet, StructStore // eslint-disable-line
|
||||
} from '../src/internals.js'
|
||||
|
||||
import * as t from 'lib0/testing.js'
|
||||
import * as prng from 'lib0/prng.js'
|
||||
import { createMutex } from 'lib0/mutex.js'
|
||||
import * as encoding from 'lib0/encoding.js'
|
||||
import * as decoding from 'lib0/decoding.js'
|
||||
import * as syncProtocol from 'y-protocols/sync.js'
|
||||
import { createDeleteSetFromStructStore, DeleteSet } from '../src/utils/DeleteSet.js' // eslint-disable-line
|
||||
import { getStates, StructStore } from '../src/utils/StructStore.js' // eslint-disable-line
|
||||
import { AbstractItem } from '../src/structs/AbstractItem.js' // eslint-disable-line
|
||||
|
||||
/**
|
||||
* @param {TestYInstance} y
|
||||
@@ -278,9 +283,6 @@ export const compare = users => {
|
||||
compareDS(createDeleteSetFromStructStore(users[i].store), createDeleteSetFromStructStore(users[i + 1].store))
|
||||
compareStructStores(users[i].store, users[i + 1].store)
|
||||
}
|
||||
users.forEach(user =>
|
||||
t.assert(user._missingStructs.size === 0)
|
||||
)
|
||||
users.map(u => u.destroy())
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { init, compare, applyRandomTests, TestYInstance } from './testHelper.js' // eslint-disable-line
|
||||
|
||||
import * as Y from '../src/index.js'
|
||||
import * as t from 'lib0/testing.js'
|
||||
import * as prng from 'lib0/prng.js'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { init, compare, applyRandomTests, TestYInstance } from './testHelper.js' // eslint-disable-line
|
||||
|
||||
import * as Y from '../src/index.js'
|
||||
import * as t from 'lib0/testing.js'
|
||||
import * as prng from 'lib0/prng.js'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { init, compare } from './testHelper.js'
|
||||
|
||||
import * as t from 'lib0/testing.js'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { init, compare } from './testHelper.js'
|
||||
import * as Y from '../src/index.js'
|
||||
|
||||
import * as t from 'lib0/testing.js'
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user