Skip to content

Commit

Permalink
actually dont import - causes issues
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Sep 18, 2021
1 parent 8037766 commit 75903a2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/cli/index.ts
Expand Up @@ -30,8 +30,9 @@ import HttpStream from '../formatter/http_stream'
import { promisify } from 'util'
import { Writable } from 'stream'
import { pathToFileURL } from 'url'
import importer from '../importer'

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { importer } = require('../importer')
const { incrementing, uuid } = IdGenerator

export interface ICliRunResult {
Expand Down
3 changes: 2 additions & 1 deletion src/formatter/builder.ts
Expand Up @@ -21,7 +21,8 @@ import { IParsedArgvFormatOptions } from '../cli/argv_parser'
import { SnippetInterface } from './step_definition_snippet_builder/snippet_syntax'
import HtmlFormatter from './html_formatter'
import { pathToFileURL } from 'url'
import importer from '../importer'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { importer } = require('../importer')

interface IGetStepDefinitionSnippetBuilderOptions {
cwd: string
Expand Down
2 changes: 1 addition & 1 deletion src/importer.js
Expand Up @@ -12,4 +12,4 @@ async function importer(descriptor) {
return await import(descriptor)
}

module.exports = importer
module.exports = { importer }
3 changes: 2 additions & 1 deletion src/runtime/parallel/worker.ts
Expand Up @@ -19,8 +19,9 @@ import { IRuntimeOptions } from '../index'
import { PredictableTestRunStopwatch, RealTestRunStopwatch } from '../stopwatch'
import { duration } from 'durations'
import { pathToFileURL } from 'url'
import importer from '../../importer'

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { importer } = require('../../importer')
const { uuid } = IdGenerator

type IExitFunction = (exitCode: number, error?: Error, message?: string) => void
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"lib": ["es2019"],
"module": "commonjs",
Expand Down

0 comments on commit 75903a2

Please sign in to comment.