2023-03-21 11:14:37 +01:00
|
|
|
/* eslint-env node */
|
2019-03-01 23:26:40 +01:00
|
|
|
|
2019-03-11 00:00:41 +01:00
|
|
|
import * as map from './y-map.tests.js'
|
2020-07-12 09:26:08 -06:00
|
|
|
import * as array from './y-array.tests.js'
|
2019-03-12 01:22:06 +01:00
|
|
|
import * as text from './y-text.tests.js'
|
2019-03-12 01:42:51 +01:00
|
|
|
import * as xml from './y-xml.tests.js'
|
2019-04-07 23:08:08 +02:00
|
|
|
import * as encoding from './encoding.tests.js'
|
2019-06-23 13:04:14 +02:00
|
|
|
import * as undoredo from './undo-redo.tests.js'
|
2020-06-19 21:45:10 +02:00
|
|
|
import * as compatibility from './compatibility.tests.js'
|
2020-07-12 18:39:15 +02:00
|
|
|
import * as doc from './doc.tests.js'
|
2020-07-22 18:35:03 +03:00
|
|
|
import * as snapshot from './snapshot.tests.js'
|
2020-12-07 19:47:48 +01:00
|
|
|
import * as updates from './updates.tests.js'
|
2021-01-08 23:03:16 +01:00
|
|
|
import * as relativePositions from './relativePositions.tests.js'
|
2025-04-08 20:50:20 +02:00
|
|
|
import * as idset from './IdSet.tests.js'
|
2025-04-18 20:26:05 +02:00
|
|
|
import * as idmap from './IdMap.tests.js'
|
2025-05-21 16:04:55 +02:00
|
|
|
import * as attribution from './attribution.tests.js'
|
2025-10-30 03:26:24 +01:00
|
|
|
import * as delta from './delta.tests.js'
|
2019-03-01 23:26:40 +01:00
|
|
|
|
2021-05-14 18:53:24 +02:00
|
|
|
import { runTests } from 'lib0/testing'
|
|
|
|
|
import { isBrowser, isNode } from 'lib0/environment'
|
|
|
|
|
import * as log from 'lib0/logging'
|
2019-04-04 19:35:38 +02:00
|
|
|
|
2019-03-01 23:26:40 +01:00
|
|
|
if (isBrowser) {
|
|
|
|
|
log.createVConsole(document.body)
|
|
|
|
|
}
|
2024-12-18 14:34:26 +01:00
|
|
|
|
|
|
|
|
const tests = {
|
2025-10-30 03:26:24 +01:00
|
|
|
doc, map, array, text, xml, encoding, undoredo, compatibility, snapshot, updates, relativePositions, idset, idmap, attribution, delta
|
2024-12-18 14:34:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const run = async () => {
|
|
|
|
|
const success = await runTests(tests)
|
2019-04-05 21:06:43 +02:00
|
|
|
/* istanbul ignore next */
|
|
|
|
|
if (isNode) {
|
|
|
|
|
process.exit(success ? 0 : 1)
|
|
|
|
|
}
|
2024-12-18 14:34:26 +01:00
|
|
|
}
|
|
|
|
|
run()
|