Registry / testing / regexpu-fixtures

regexpu-fixtures

JSON →
library2.1.6jsnpmunverified

Test fixtures (test cases) for the regexpu project, which transpiles ES2015 Unicode regular expressions to ES5. Version 2.1.6 is stable. The package contains JSON data used by regexpu's test suite and may be reused by other JavaScript regex tools. No active development since the last release. Differentiator: provides a comprehensive set of test cases for Unicode-aware regex transpilation.

npm install regexpu-fixtures
INSTALL
IMPORT
SIG · REGEXPU-FIXTURES
R
regexpu-fixtures
testingjavascriptv2.1.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

data
import data from 'regexpu-fixtures/data.json' assert { type: 'json' };
const data = require('regexpu-fixtures');
No default export from package; import the JSON file directly. In CommonJS, use `require('regexpu-fixtures/data.json')`.
rawFixtures
import rawFixtures from 'regexpu-fixtures/raw-fixtures.json' assert { type: 'json' };
const rawFixtures = require('regexpu-fixtures/raw-fixtures');
Path requires extension. ESM import assertion required for JSON modules.
es6
import es6 from 'regexpu-fixtures/es6.json' assert { type: 'json' };
import es6 from 'regexpu-fixtures';
Use full path to JSON file.

Shows how to import and inspect the test fixture data from regexpu-fixtures.

import data from 'regexpu-fixtures/data.json' assert { type: 'json' }; console.log(Object.keys(data)); // List of fixture categories // Access specific test cases const es5fixtures = data['es5-fixtures']; console.log(es5fixtures.length); // Number of test cases
Debug
Known issues
gotchaNo default export from the package; you must import JSON files by their full path with extension.
fix
Use import with path to .json file and assert type (ESM) or require with .json extension (CJS).
affects: all
Errors
Common errors & fixes
Cannot find module 'regexpu-fixtures'
Importing the package without specifying a JSON file path.
fix
Import a specific file: import data from 'regexpu-fixtures/data.json' assert { type: 'json' };
Upgrade
Version history
2.1.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
regexpu-fixtures — npm install regexpu-fixtures · libregistry