Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions integration/theme-resolving/inline-content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,25 @@ const baseDir = path.resolve(__dirname, '../..');
const cli = path.join(baseDir, 'packages/cli/dist/index.js');
const tmp = temporaryDirectory();

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

test(
'getInlineContentForPackage finds files from @tutorialkit/astro',
{ timeout: process.env.CI ? 60_000 : 10_000 },
afterAll(
async () => {
await execa(
'node',
[cli, 'create', 'theme-test', '--install', '--no-git', '--no-start', '--package-manager', 'pnpm', '--defaults'],
{ cwd: tmp },
);

const content = getInlineContentForPackage({
name: '@tutorialkit/astro',
pattern: '/dist/default/**/*.astro',
root: `${tmp}/theme-test`,
});

expect(content.length).toBeGreaterThan(0);
await fs.rm(tmp, { force: true, recursive: true });
},
process.env.CI ? 60_000 : 10_000,
);

test('getInlineContentForPackage finds files from @tutorialkit/astro', async () => {
await execa(
'node',
[cli, 'create', 'theme-test', '--install', '--no-git', '--no-start', '--package-manager', 'pnpm', '--defaults'],
{ cwd: tmp },
);

const content = getInlineContentForPackage({
name: '@tutorialkit/astro',
pattern: '/dist/default/**/*.astro',
root: `${tmp}/theme-test`,
});

expect(content.length).toBeGreaterThan(0);
});
Loading