Skip to content

Commit

Permalink
hook up in parallel worker
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Apr 22, 2024
1 parent ce54b18 commit 5339442
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/parallel/worker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EventEmitter } from 'node:events'
import { pathToFileURL } from 'node:url'
import { register } from 'node:module'
import * as messages from '@cucumber/messages'
import { IdGenerator } from '@cucumber/messages'
import { JsonObject } from 'type-fest'
Expand Down Expand Up @@ -69,6 +70,9 @@ export default class Worker {
)
supportCodeCoordinates.requireModules.map((module) => tryRequire(module))
supportCodeCoordinates.requirePaths.map((module) => tryRequire(module))
for (const descriptor of supportCodeCoordinates.loaders) {
register(descriptor, pathToFileURL(this.cwd))
}
for (const path of supportCodeCoordinates.importPaths) {
await import(pathToFileURL(path).toString())
}
Expand Down

0 comments on commit 5339442

Please sign in to comment.