Files
yjs/tests/index.js

39 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-03-21 11:14:37 +01:00
/* eslint-env node */
2019-03-01 23:26:40 +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'
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'
import * as snapshot from './snapshot.tests.js'
2020-12-07 19:47:48 +01:00
import * as updates from './updates.tests.js'
import * as relativePositions from './relativePositions.tests.js'
import * as delta from './delta.tests.js'
import * as idset from './IdSet.tests.js'
import * as idmap from './IdMap.tests.js'
2025-05-21 16:04:55 +02:00
import * as attribution from './attribution.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-03-01 23:26:40 +01:00
if (isBrowser) {
log.createVConsole(document.body)
}
2024-12-18 14:34:26 +01:00
const tests = {
2025-05-21 16:04:55 +02:00
doc, map, array, text, xml, encoding, undoredo, compatibility, snapshot, updates, relativePositions, delta, idset, idmap, attribution
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()