test: isolate main checkout verification
This commit is contained in:
3 files changed
+13
-1
No files matched your search
@@ -31,6 +31,16 @@ test('scripts activate chrnx and run Composer from the mapped theme', async () =
|
||||
);
|
||||
});
|
||||
|
||||
test('Jest discovers JavaScript tests only from the active checkout', async () => {
|
||||
const pkg = JSON.parse(await readFile('package.json', 'utf8'));
|
||||
|
||||
assert.match(
|
||||
pkg.scripts['test:js'],
|
||||
/--modulePathIgnorePatterns='<rootDir>\/\.worktrees\/'/,
|
||||
);
|
||||
assert.equal(pkg.jest, undefined);
|
||||
});
|
||||
|
||||
test('PHP quality tools enforce the CHRNX conventions and cannot pass an empty suite', async () => {
|
||||
const phpcs = await readFile('phpcs.xml.dist', 'utf8');
|
||||
const phpunit = await readFile('phpunit.xml.dist', 'utf8');
|
||||
@@ -39,6 +49,7 @@ test('PHP quality tools enforce the CHRNX conventions and cannot pass an empty s
|
||||
assert.match(phpcs, /<rule ref="WordPress-Extra"\/>/);
|
||||
assert.match(phpcs, /name="text_domain"[^>]+value="chrnx"/);
|
||||
assert.match(phpcs, /name="prefixes"[^>]+value="chrnx_"/);
|
||||
assert.match(phpcs, /<exclude-pattern>\*\/\.worktrees\/\*<\/exclude-pattern>/);
|
||||
assert.match(phpunit, /bootstrap="tests\/php\/bootstrap\.php"/);
|
||||
assert.match(phpunit, /failOnEmptyTestSuite="true"/);
|
||||
assert.match(phpunit, /<directory suffix="Test\.php">tests\/php<\/directory>/);
|
||||
|
||||
Reference in new issue
Block a user