Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pref: optimize test #341

Merged
merged 20 commits into from
Aug 9, 2024
Prev Previous commit
Next Next commit
ci: test windows different
  • Loading branch information
zyyv committed Aug 2, 2024
commit 4708fdcad78cd263113741aa07aae5a0c5485301
3 changes: 3 additions & 0 deletions test/docs/docs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
const docsPath = path.resolve(__dirname, '../../docs/src/index.md');
const DOCS = fs.readFileSync(docsPath, 'utf-8');

console.log('DOCS', DOCS);
console.log('regex', /^```js$\n(^[^`].+$\n)+/gm);

const snippets = DOCS.match(/^```js$\n(^[^`].+$\n)+/gm).map((s) =>

Check failure on line 12 in test/docs/docs.test.js

View workflow job for this annotation

GitHub Actions / test (lts/*, windows-latest)

test/docs/docs.test.js

TypeError: Cannot read properties of null (reading 'map') ❯ test/docs/docs.test.js:12:56
s.split('\n').slice(1).join('\n')
);

Expand Down
Loading