feat: node test runner & fastify v5 #919
Annotations
10 errors and 2 notices
builds the query signature:
dist/src/ApolloTraceBuilder.spec.js#L30
[Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'equal')] {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'equal')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/ApolloTraceBuilder.spec.ts:32:12)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at Test.start (node:internal/test_runner/test:542:17)
at startSubtest (node:internal/test_runner/harness:214:17),
code: 'ERR_TEST_FAILURE'
}
|
start and end times match time change:
dist/src/ApolloTraceBuilder.spec.js#L39
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'deepEqual')
at async Promise.all (index 0) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'deepEqual')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/ApolloTraceBuilder.spec.ts:51:14)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at Test.start (node:internal/test_runner/test:542:17)
at node:internal/test_runner/test:946:71
at node:internal/per_context/primordials:487:82
at new Promise (<anonymous>)
at new SafePromise (node:internal/per_context/primordials:455:29)
at node:internal/per_context/primordials:487:9
at Array.map (<anonymous>),
code: 'ERR_TEST_FAILURE'
}
|
e2e metrics including "sample error" error are reported:
dist/src/e2e.spec.js#L13
[Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'equal')] {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'equal')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/e2e.spec.ts:47:12)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:632:9)
at async startSubtest (node:internal/test_runner/harness:214:3),
code: 'ERR_TEST_FAILURE'
}
|
/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/dist/src/e2e.spec.js:
dist/src/e2e.spec.js#L1
Error [ERR_TEST_FAILURE]: test timed out after 30000ms
at async Promise.allSettled (index 1) {
failureType: 'testTimeoutFailure',
cause: 'test timed out after 30000ms',
code: 'ERR_TEST_FAILURE'
}
|
plugin should throw an error if api key is missing:
dist/src/index.spec.js#L41
[Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'rejects')] {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'rejects')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/index.spec.ts:50:20)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Suite.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should contain trace with reference to field used in query:
dist/src/index.spec.js#L72
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'equal')
at async Promise.all (index 0) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'equal')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/index.spec.ts:100:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:632:9)
at async Promise.all (index 0)
at async Suite.run (node:internal/test_runner/test:948:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should contain trace with reference to field used in query with with multiple operations:
dist/src/index.spec.js#L92
[Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'equal')] {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'equal')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/index.spec.ts:135:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:632:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should contain client name and version from request headers:
dist/src/index.spec.js#L118
[Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'equal')] {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'equal')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/index.spec.ts:175:14)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at process.processImmediate (node:internal/timers:447:9)
at async Test.run (node:internal/test_runner/test:632:9)
at async Suite.processPendingSubtests (node:internal/test_runner/test:374:7),
code: 'ERR_TEST_FAILURE'
}
|
should contain two traces with references to fields used in each query operation:
dist/src/indexWithBatching.spec.js#L36
Error [ERR_TEST_FAILURE]: Cannot read properties of undefined (reading 'deepStrictEqual')
at async Promise.all (index 0) {
failureType: 'testCodeFailure',
cause: TypeError [Error]: Cannot read properties of undefined (reading 'deepStrictEqual')
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/indexWithBatching.spec.ts:65:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Test.run (node:internal/test_runner/test:632:9)
at async Promise.all (index 0)
at async Suite.run (node:internal/test_runner/test:948:7)
at async startSubtest (node:internal/test_runner/harness:214:3),
code: 'ERR_TEST_FAILURE'
}
|
sendReport encodes the report:
dist/src/sendReport.spec.js#L33
Error [ERR_TEST_FAILURE]: listen EADDRINUSE: address already in use :::3334
at process.emit (node:events:517:28) {
failureType: 'uncaughtException',
cause: Error: listen EADDRINUSE: address already in use :::3334
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at __node_internal_uvExceptionWithHostPort (node:internal/errors:593:12)
at Server.setupListenHandle [as _listen2] (node:net:1817:16)
at listenInCluster (node:net:1865:12)
at Server.listen (node:net:1953:7)
at createSimpleServer (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/createSimpleServer.ts:22:10)
at TestContext.<anonymous> (/home/runner/work/mercurius-apollo-tracing/mercurius-apollo-tracing/src/sendReport.spec.ts:40:36)
at Test.runInAsyncScope (node:async_hooks:203:9)
at Test.run (node:internal/test_runner/test:631:25)
at Test.start (node:internal/test_runner/test:542:17)
at startSubtest (node:internal/test_runner/harness:214:17) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '::',
port: 3334
},
code: 'ERR_TEST_FAILURE'
}
|
build (20)
TypeScript: compilation complete (2193ms)
Total Tests: 13
Suites 📂: 5
Passed ✅: 13
Failed ❌: 0
Canceled 🚫: 0
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 2498.447ms
|
build (18)
TypeScript: compilation complete (2238ms)
Total Tests: 14
Suites 📂: 5
Passed ✅: 1
Failed ❌: 12
Canceled 🚫: 1
Skipped ⏭️: 0
Todo 📝: 0
Duration 🕐: 30029.366ms
|