puppeteer/packages/ng-schematics/test/src/config.test.ts

31 lines
815 B
TypeScript
Raw Normal View History

2024-01-03 09:57:25 +00:00
import {describe, it} from 'node:test';
import expect from 'expect';
import {
buildTestingTree,
2023-08-18 14:16:07 +00:00
getMultiApplicationFile,
setupHttpHooks,
} from './utils.js';
2024-01-03 09:57:25 +00:00
void describe('@puppeteer/ng-schematics: config', () => {
setupHttpHooks();
2024-01-03 09:57:25 +00:00
void describe('Single Project', () => {
void it('should create default file', async () => {
const tree = await buildTestingTree('config', 'single');
expect(tree.files).toContain('/.puppeteerrc.mjs');
});
});
2024-01-03 09:57:25 +00:00
void describe('Multi projects', () => {
void it('should create default file', async () => {
const tree = await buildTestingTree('config', 'multi');
expect(tree.files).toContain('/.puppeteerrc.mjs');
2023-08-18 14:16:07 +00:00
expect(tree.files).not.toContain(
getMultiApplicationFile('.puppeteerrc.mjs')
);
});
});
});