mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
87170c3f92
This commit adds support for running tests that match a regular expression. Fixes: https://github.com/nodejs/node/issues/42984
14 lines
523 B
JavaScript
14 lines
523 B
JavaScript
// Flags: --no-warnings --test-only --test-name-pattern=enabled
|
|
'use strict';
|
|
const common = require('../common');
|
|
const { test } = require('node:test');
|
|
|
|
test('enabled and only', { only: true }, common.mustCall(async (t) => {
|
|
await t.test('enabled', common.mustCall());
|
|
await t.test('disabled', common.mustNotCall());
|
|
}));
|
|
|
|
test('enabled but not only', common.mustNotCall());
|
|
test('only does not match pattern', { only: true }, common.mustNotCall());
|
|
test('not only and does not match pattern', common.mustNotCall());
|