Skip to content

Commit ebc516e

Browse files
authored
Merge pull request #136 from ether/feat/downstream-wire-compat
test: downstream wire-compat (vectors + smoke)
2 parents 9be4596 + e4b4643 commit ebc516e

5 files changed

Lines changed: 489 additions & 1 deletion

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@
3939
"@types/superagent": "^8.1.7",
4040
"eslint": "^9.32.0",
4141
"eslint-config-etherpad": "^3.0.13",
42+
"tsx": "^4.22.4",
4243
"typescript": "^5.4.2"
4344
},
4445
"scripts": {
4546
"build": "tsc",
4647
"prepublishOnly": "npm run build",
4748
"lint": "eslint .",
48-
"lint:fix": "eslint --fix ."
49+
"lint:fix": "eslint --fix .",
50+
"test": "pnpm run test:vectors && pnpm run test:smoke",
51+
"test:vectors": "tsx --test test/vectors.test.ts",
52+
"test:smoke": "tsx --test test/smoke.test.ts"
4953
},
5054
"engines": {
5155
"node": ">=18.0.0"

pnpm-lock.yaml

Lines changed: 290 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/wire-vectors.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{"name":"plain-insert","initialText":"abc\n","changeset":"Z:4>3=3+3$XYZ","pool":{"numToAttrib":{},"nextNum":0},"resultText":"abcXYZ\n"},
3+
{"name":"plain-delete","initialText":"abcdef\n","changeset":"Z:7<3=1-3$","pool":{"numToAttrib":{},"nextNum":0},"resultText":"aef\n"},
4+
{"name":"formatted-insert","initialText":"abc\n","changeset":"Z:4>4=3*0+4$bold","pool":{"numToAttrib":{"0":["bold","true"]},"nextNum":1},"resultText":"abcbold\n"},
5+
{"name":"multiline-insert","initialText":"abc\n","changeset":"Z:4>8=3|2+8$one\ntwo\n","pool":{"numToAttrib":{},"nextNum":0},"resultText":"abcone\ntwo\n\n"},
6+
{"name":"attrib-reuse","initialText":"abc\n","changeset":"Z:4>2*0+1=3*0+1$AB","pool":{"numToAttrib":{"0":["bold","true"]},"nextNum":1},"resultText":"AabcB\n"}
7+
]

0 commit comments

Comments
 (0)