Skip to content

Commit

Permalink
fix: node adapter locals test
Browse files Browse the repository at this point in the history
  • Loading branch information
wrapperup authored and ematipico committed Jun 13, 2023
1 parent 05bce5c commit ae0f8e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/integrations/node/test/locals.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('API routes', () => {
});

it('Can render locals in page', async () => {
const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs');
const { handler } = await import('./fixtures/locals/dist/server/entry.mjs');
let { req, res, text } = createRequestAndResponse({
method: 'POST',
url: '/foo',
Expand All @@ -33,7 +33,7 @@ describe('API routes', () => {
});

it('Can access locals in API', async () => {
const { handler } = await import('./fixtures/api-route/dist/server/entry.mjs');
const { handler } = await import('./fixtures/locals/dist/server/entry.mjs');
let { req, res, done } = createRequestAndResponse({
method: 'POST',
url: '/api',
Expand All @@ -48,7 +48,6 @@ describe('API routes', () => {

let json = JSON.parse(buffer.toString('utf-8'));

expect(json.length).to.equal(1);
expect(json[0].foo).to.equal('bar');
expect(json.foo).to.equal('bar');
});
});

0 comments on commit ae0f8e3

Please sign in to comment.