Skip to content

Commit

Permalink
Merge pull request #1269 from mikepenz/feature/esm
Browse files Browse the repository at this point in the history
Convert project to use ESM instead of CJS
  • Loading branch information
mikepenz authored Dec 15, 2024
2 parents 62516aa + 1c71286 commit 9f154d5
Show file tree
Hide file tree
Showing 18 changed files with 4,154 additions and 4,340 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ $ npm install
# Verify lint is happy
$ npm run lint -- --fix
# Format
$ npm run format
# Build the typescript and package it for distribution
$ npm run build && npm run package
Expand Down
4 changes: 2 additions & 2 deletions __tests__/table.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {parseTestReports} from '../src/testParser'
import {buildSummaryTables} from '../src/table'
import {parseTestReports} from '../src/testParser.js'
import {buildSummaryTables} from '../src/table.js'

/**
* Copyright Mike Penz
Expand Down
11 changes: 7 additions & 4 deletions __tests__/testParser.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {parseFile, parseTestReports, resolveFileAndLine, resolvePath, Transformer} from '../src/testParser'
import {parseFile, parseTestReports, resolveFileAndLine, resolvePath, Transformer} from '../src/testParser.js'

/**
* Original test cases:
Expand Down Expand Up @@ -426,7 +426,8 @@ describe('parseFile', () => {
true,
false,
undefined,
true)
true
)
expect(testResult).toBeDefined()
const {totalCount, skippedCount, globalAnnotations} = testResult!!
const filtered = globalAnnotations.filter(annotation => annotation.annotation_level !== 'notice')
Expand All @@ -438,10 +439,12 @@ describe('parseFile', () => {
annotation_level: 'failure',
end_column: 0,
end_line: 154,
message: 'thread \'test_failure\' panicked at tests/parry3d.rs:154:5:\n' +
message:
"thread 'test_failure' panicked at tests/parry3d.rs:154:5:\n" +
' assertion `left == right` failed: 0 must equal 1',
path: 'tests/parry3d.rs',
raw_details: 'thread \'test_failure\' panicked at tests/parry3d.rs:154:5:\n' +
raw_details:
"thread 'test_failure' panicked at tests/parry3d.rs:154:5:\n" +
' assertion `left == right` failed: 0 must equal 1\n' +
' left: 0\n' +
' right: 1\n' +
Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {readTransformers} from '../src/utils'
import {readTransformers} from '../src/utils.js'

/**
* Copyright 2024 Mike Penz
Expand Down
Loading

0 comments on commit 9f154d5

Please sign in to comment.