Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
ci: attempt to fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Jan 21, 2024
1 parent 08e4219 commit d028b23
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
"test": "tsd && c8 --reporter lcov --reporter text node -r @swc-node/register --test test/**/*.test.tsx",
"test:watch": "c8 --reporter lcov --reporter text node -r @swc-node/register --test --watch test/**/*.test.tsx"
},
"pre-commit": [
"lint",
"test"
],
"dependencies": {
"fastify-plugin": "^4.0.0"
},
Expand All @@ -46,8 +42,5 @@
"peerDependencies": {
"@kitajs/html": ">=3.1"
},
"publishConfig": {
"access": "public"
},
"packageManager": "[email protected]"
}
30 changes: 15 additions & 15 deletions test/stream-html.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ async function SleepForMs({ ms, children }: PropsWithChildren<{ ms: number }>) {
return Html.contentsToString([children || String(ms)]);
}

// Detect leaks of pending promises
afterEach(() => {
assert.equal(
SUSPENSE_ROOT.requests.size,
0,
'Suspense root left pending resources'
);

// Reset suspense root
SUSPENSE_ROOT.enabled = false;
SUSPENSE_ROOT.autoScript = true;
SUSPENSE_ROOT.requestCounter = 1;
SUSPENSE_ROOT.requests.clear();
});

describe('Suspense', () => {
// Detect leaks of pending promises
afterEach(() => {
assert.equal(
SUSPENSE_ROOT.requests.size,
0,
'Suspense root left pending resources'
);

// Reset suspense root
SUSPENSE_ROOT.enabled = false;
SUSPENSE_ROOT.autoScript = true;
SUSPENSE_ROOT.requestCounter = 1;
SUSPENSE_ROOT.requests.clear();
});

test('Sync without suspense', async () => {
await using app = fastify();
app.register(fastifyKitaHtml);
Expand Down

0 comments on commit d028b23

Please sign in to comment.