Skip to content

Commit

Permalink
Looks like the typescript tests potentially weren't running before, b…
Browse files Browse the repository at this point in the history
…ut they are now?
  • Loading branch information
NullVoxPopuli committed Jul 14, 2023
1 parent be0bbe3 commit bb2f1f1
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/smoke-tests/--typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {
let cwd = '';
let tmpDir = '';
let distDir = '';
let declarationsDir = '';

beforeAll(async () => {
tmpDir = await createTmp();
Expand All @@ -28,12 +29,13 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {

cwd = path.join(tmpDir, name);
distDir = path.join(cwd, name, 'dist');
declarationsDir = path.join(cwd, name, 'declarations');

await install({ cwd, packageManager, skipPrepare: true });
});

afterAll(async () => {
await fs.rm(tmpDir, { recursive: true, force: true });
// await fs.rm(tmpDir, { recursive: true, force: true });
});

it('was generated correctly', async () => {
Expand All @@ -47,17 +49,22 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) {

expect(exitCode).toEqual(0);

let contents = await dirContents(distDir);
let distContents = await dirContents(distDir);
let declarationsContents = await dirContents(declarationsDir);

expect(contents).to.deep.equal([
'index.d.ts',
'index.d.ts.map',
expect(distContents).to.deep.equal([
'index.js',
'index.js.map',
'template-registry.d.ts',
'template-registry.js',
'template-registry.js.map',
]);

expect(declarationsContents).to.deep.equal([
'index.d.ts',
'index.d.ts.map',
'template-registry.d.ts',
'template-registry.d.ts.map',
]);
});

it('runs tests', async () => {
Expand Down

0 comments on commit bb2f1f1

Please sign in to comment.