Skip to content

Commit

Permalink
test: don't use .ts for unknown extension tests
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Jan 7, 2025
1 parent 974487d commit c11919e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ describe(`Plug'n'Play - ESM`, () => {
{
},
async ({path, run, source}) => {
await xfs.writeFilePromise(ppath.join(path, `index.ts`), `console.log(typeof require === 'undefined')`);
await xfs.writeFilePromise(ppath.join(path, `index.foo`), `console.log(typeof require === 'undefined')`);

await run(`install`);

await expect(run(`node`, `./index.ts`)).resolves.toMatchObject({
await expect(run(`node`, `./index.foo`)).resolves.toMatchObject({
code: 0,
stdout: `false\n`,
});
Expand All @@ -345,13 +345,13 @@ describe(`Plug'n'Play - ESM`, () => {
type: `module`,
},
async ({path, run, source}) => {
await xfs.writeFilePromise(ppath.join(path, `index.ts`), ``);
await xfs.writeFilePromise(ppath.join(path, `index.foo`), ``);

await run(`install`);

await expect(run(`node`, `./index.ts`)).rejects.toMatchObject({
await expect(run(`node`, `./index.foo`)).rejects.toMatchObject({
code: 1,
stderr: expect.stringContaining(`Unknown file extension ".ts"`),
stderr: expect.stringContaining(`Unknown file extension ".foo"`),
});
},
),
Expand Down

0 comments on commit c11919e

Please sign in to comment.