Moved to ts (#6593)

* Moved to ts

* Fixed type check

* Removed js suffixes

* Migrated to ts

* Fixed ts.

* Fixed type check

* Installed missing d ts
This commit is contained in:
SamTV12345 2024-08-17 20:14:36 +02:00 committed by GitHub
parent 5ee2c4e7f8
commit 7e3ad03e2f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 961 additions and 830 deletions

View file

@ -1,12 +1,13 @@
'use strict';
const SkipList = require('ep_etherpad-lite/static/js/skiplist');
import SkipList from 'ep_etherpad-lite/static/js/skiplist';
import {expect, describe, it} from 'vitest';
describe('skiplist.js', function () {
it('rejects null keys', async function () {
const skiplist = new SkipList();
for (const key of [undefined, null]) {
// @ts-ignore
expect(() => skiplist.push({key})).toThrowError();
}
});