test: create pages tests to use new create pages #5296
Annotations
4 errors and 1 warning
Run pnpm test:
packages/waku/tests/create-pages.test.ts#L670
AssertionError: expected [ { …(5) } ] to deeply equal [ { elements: { …(2) }, …(4) }, …(1) ]
- Expected
+ Received
Array [
Object {
"elements": Object {
- "page:/test/w/x": Object {
- "isStatic": true,
- },
- "root": Object {
- "isStatic": true,
- },
- },
- "noSsr": false,
- "path": Array [
- Object {
- "name": "test",
- "type": "literal",
- },
- Object {
- "name": "w",
- "type": "literal",
- },
- Object {
- "name": "x",
- "type": "literal",
- },
- ],
- "pattern": "^/test/w/x$",
- "routeElement": Object {
- "isStatic": true,
- },
- },
- Object {
- "elements": Object {
- "page:/test/y/z": Object {
+ "page:/test/[a]/[b]": Object {
"isStatic": true,
},
"root": Object {
"isStatic": true,
},
},
"noSsr": false,
"path": Array [
Object {
"name": "test",
"type": "literal",
},
Object {
"name": "y",
"type": "literal",
},
Object {
"name": "z",
"type": "literal",
},
],
- "pattern": "^/test/y/z$",
+ "pattern": "^/test/([^/]+)/([^/]+)$",
"routeElement": Object {
"isStatic": true,
},
},
]
❯ tests/create-pages.test.ts:670:35
|
Run pnpm test:
packages/waku/tests/create-pages.test.ts#L778
AssertionError: expected [ { pattern: '^/test/(.*)$', …(4) } ] to deeply equal [ { elements: { …(2) }, …(4) } ]
- Expected
+ Received
Array [
Object {
"elements": Object {
- "page:/test/a/b": Object {
+ "page:/test/[...path]": Object {
"isStatic": true,
},
"root": Object {
"isStatic": true,
},
},
"noSsr": false,
"path": Array [
Object {
"name": "test",
"type": "literal",
},
Object {
"name": "a",
"type": "literal",
},
Object {
"name": "b",
"type": "literal",
},
],
- "pattern": "^/test/a/b$",
+ "pattern": "^/test/(.*)$",
"routeElement": Object {
"isStatic": true,
},
},
]
❯ tests/create-pages.test.ts:778:35
|
Run pnpm test:
packages/waku/tests/create-pages.test.ts#L980
AssertionError: expected [ { …(5) }, { …(5) }, { …(5) }, …(6) ] to deeply equal [ { elements: { …(2) }, …(4) }, …(12) ]
- Expected
+ Received
Array [
Object {
"elements": Object {
"page:/client/static": Object {
"isStatic": true,
},
"root": Object {
"isStatic": true,
},
},
"noSsr": false,
"path": Array [
Object {
"name": "client",
"type": "literal",
},
Object {
"name": "static",
"type": "literal",
},
],
"pattern": "^/client/static$",
"routeElement": Object {
"isStatic": true,
},
},
Object {
"elements": Object {
- "page:/server/static/static-echo": Object {
- "isStatic": true,
- },
- "root": Object {
- "isStatic": true,
- },
- },
- "noSsr": false,
- "path": Array [
- Object {
- "name": "server",
- "type": "literal",
- },
- Object {
- "name": "static",
- "type": "literal",
- },
- Object {
- "name": "static-echo",
- "type": "literal",
- },
- ],
- "pattern": "^/server/static/static-echo$",
- "routeElement": Object {
- "isStatic": true,
- },
- },
- Object {
- "elements": Object {
- "page:/server/static/static-echo-2": Object {
+ "page:/server/static/[echo]": Object {
"isStatic": true,
},
"root": Object {
"isStatic": true,
},
},
"noSsr": false,
"path": Array [
Object {
"name": "server",
"type": "literal",
},
Object {
"name": "static",
"type": "literal",
},
Object {
"name": "static-echo-2",
"type": "literal",
},
],
- "pattern": "^/server/static/static-echo-2$",
+ "pattern": "^/server/static/([^/]+)$",
"routeElement": Object {
"isStatic": true,
},
},
Object {
"elements": Object {
- "page:/server/static/static-echo/static-echo-2": Object {
- "isStatic": true,
- },
- "root": Object {
- "isStatic": true,
- },
- },
- "noSsr": false,
- "path": Array [
- Object {
- "name": "server",
- "type": "literal",
- },
- Object {
- "name": "static",
- "type": "literal",
- },
- Object {
- "name": "static-echo",
- "type": "literal",
- },
- Object {
- "name": "static-echo-2",
- "type": "literal",
- },
- ],
- "pattern": "^/server/static/static-echo/static-echo-2$",
- "routeElement": Object {
- "isStatic": true,
- },
- },
- Object {
- "elements": Object {
- "page:/server/static/hello/hello-2": Object {
+ "page:/server/static/[echo]/[echo2]": Object {
"isStatic": true,
},
"root": Object {
"isStatic": true,
},
},
"noSsr": false,
"path": Array [
Object {
"name": "server",
- "type": "literal",
- },
- Object {
- "name": "static",
- "type": "literal",
- },
- Object {
- "name": "hello",
"type": "literal",
},
Object {
- "name": "hello-2",
- "type": "literal",
- },
- ],
- "pattern": "^/server/static/hello/hello-2$",
- "routeElement": Object {
- "isStatic": true,
- },
- },
- Object {
- "elements": Object {
- "page:/static/wild/bar": Object {
- "isStatic": true,
- },
- "root": Object {
- "isStatic": true,
- },
- },
- "noSsr": false,
- "path": Array [
- Object {
"name": "static",
"type": "literal",
},
Object {
- "name": "wild",
- "type": "literal",
- },
- Object {
- "name": "bar",
- "type": "literal",
- },
- ],
- "
|
Run pnpm test
Process completed with exit code 1.
|
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "playwright-report-macos-latest-22.7.0-4".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
|
Loading