Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 22, 2025
1 parent 5aa17b4 commit c8af0f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/lib/egg_router.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ describe('test/lib/egg_router.test.js', () => {
});

it('should router.url work with pathToRegexpModule', () => {
// Not working on Node.js v8
// SyntaxError: Invalid regular expression: /^[$_\p{ID_Start}]$/: Invalid escape
if (process.version.startsWith('v8.')) return;

const app = {
controller: {
async foo() { return; },
Expand Down
4 changes: 4 additions & 0 deletions test/lib/layer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ describe('test/lib/layer.test.js', function() {
});

it('captures URL path parameters with pathToRegexpModule', function(done) {
// Not working on Node.js v8
// SyntaxError: Invalid regular expression: /^[$_\p{ID_Start}]$/: Invalid escape
if (process.version.startsWith('v8.')) return;

const app = new Koa();
const router = new Router({
pathToRegexpModule: require('path-to-regexp-v8'),
Expand Down

0 comments on commit c8af0f5

Please sign in to comment.