Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertMarashi committed Nov 23, 2023
1 parent 9e03447 commit 21b15e4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/kit/src/core/sync/write_types/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test('Rewrites types for a TypeScript module', () => {
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand All @@ -83,7 +83,7 @@ test('Rewrites types for a TypeScript module without param', () => {
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand All @@ -109,7 +109,7 @@ test('Rewrites types for a TypeScript module without param and jsdoc without typ
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand All @@ -136,7 +136,7 @@ test('Rewrites types for a JavaScript module with `function`', () => {
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand All @@ -163,7 +163,7 @@ test('Rewrites types for a JavaScript module with `const`', () => {
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand All @@ -190,7 +190,7 @@ test('Appends @ts-nocheck after @ts-check', () => {
};
`;

const rewritten = tweak_types(source, false);
const rewritten = tweak_types(source, 'page');

expect(rewritten?.exports).toEqual(['load']);
assert.equal(
Expand Down Expand Up @@ -219,7 +219,7 @@ test('Rewrites action types for a JavaScript module', () => {
}
`;

const rewritten = tweak_types(source, true);
const rewritten = tweak_types(source, 'page.server');

expect(rewritten?.exports).toEqual(['actions']);
assert.equal(
Expand Down Expand Up @@ -248,7 +248,7 @@ test('Rewrites action types for a TypeScript module', () => {
}
`;

const rewritten = tweak_types(source, true);
const rewritten = tweak_types(source, 'page.server');

expect(rewritten?.exports).toEqual(['actions']);
assert.equal(
Expand Down Expand Up @@ -281,7 +281,7 @@ test('Leaves satisfies operator untouched', () => {
} satisfies Actions
`;

const rewritten = tweak_types(source, true);
const rewritten = tweak_types(source, 'page.server');

expect(rewritten?.exports).toEqual(['load', 'actions']);
assert.equal(rewritten?.modified, false);
Expand Down

0 comments on commit 21b15e4

Please sign in to comment.