Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Mar 30, 2023
1 parent 216ef73 commit 2bb7ca2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"copy-typescript-definition": "copyfiles -f src/*.d.ts dist",
"test": "eslint src test && tsc && npm run test:mocha && npm run test:mocha:compat && npm run test:mocha:debug && npm run bench",
"test:mocha": "BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/*.test.js",
"test:mocha:compat": "BABEL_ENV=test mocha -r @babel/register -r test/setup.js 'test/compat/*.test.js'",
"test:mocha:compat": "cross-env BABEL_ENV=test mocha -r @babel/register -r test/setup.js 'test/compat/*.test.js'",
"test:mocha:debug": "BABEL_ENV=test mocha -r @babel/register -r test/setup.js 'test/debug/index.test.js'",
"format": "prettier src/**/*.{d.ts,js} test/**/*.js --write",
"prepublishOnly": "npm run build",
Expand Down
6 changes: 3 additions & 3 deletions test/compat/render-chunked.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ describe('renderToChunks', () => {
await promise;

expect(result).to.deep.equal([
'<div><!--preact-island:00-->loading...<!--/preact-island:00--></div>',
'<div><!--preact-island:6-->loading...<!--/preact-island:6--></div>',
'<div hidden>',
createInitScript(),
createSubtree('00', '<p>it works</p>'),
createSubtree('6', '<p>it works</p>'),
'</div>'
]);
});
Expand All @@ -60,7 +60,7 @@ describe('renderToChunks', () => {
suspended.resolve();

expect(result).to.deep.equal([
'<div><!--preact-island:00-->loading...<!--/preact-island:00--></div>',
'<div><!--preact-island:12-->loading...<!--/preact-island:12--></div>',
'<div hidden>',
createInitScript(1),
'</div>'
Expand Down
4 changes: 2 additions & 2 deletions test/compat/stream-node.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ describe('renderToPipeableStream', () => {
const result = await sink.promise;

expect(result).to.deep.equal([
'<div><!--preact-island:00-->loading...<!--/preact-island:00--></div>',
'<div><!--preact-island:19-->loading...<!--/preact-island:19--></div>',
'<div hidden>',
createInitScript(),
createSubtree('00', '<p>it works</p>'),
createSubtree('19', '<p>it works</p>'),
'</div>'
]);
});
Expand Down
4 changes: 2 additions & 2 deletions test/compat/stream.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ describe('renderToReadableStream', () => {
const result = await sink.promise;

expect(result).to.deep.equal([
'<div><!--preact-island:00-->loading...<!--/preact-island:00--></div>',
'<div><!--preact-island:27-->loading...<!--/preact-island:27--></div>',
'<div hidden>',
createInitScript(),
createSubtree('00', '<p>it works</p>'),
createSubtree('27', '<p>it works</p>'),
'</div>'
]);
});
Expand Down

0 comments on commit 2bb7ca2

Please sign in to comment.