Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ migrating reporter from cjs to ts #373

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: ✨ migrated tests from jasmine to jest
  • Loading branch information
WasiqB committed Sep 10, 2024
commit da354d109ad61058875c6e21bdd5582f45f51ed0
2 changes: 1 addition & 1 deletion examples/cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/node": "^22.5.4",
"cypress": "^13.14.2",
"multiple-cucumber-html-reporter": "^3.7.0",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"dependencies": {
"dayjs": "^1.11.13"
Expand Down
20 changes: 10 additions & 10 deletions examples/cypress/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { Config } from "jest";

const config: Config = {
preset: "ts-jest/presets/js-with-ts-esm",
testEnvironment: "node",
verbose: true,
clearMocks: true,
collectCoverage: false,
coverageDirectory: "coverage",
coverageReporters: ["json-summary", "text", "lcov"],
coveragePathIgnorePatterns: ["/node_modules/", "/dist/", "/src/templates/"],
transform: {},
collectCoverageFrom: ["src/**"],
testMatch: ["**/*.spec.ts"],
moduleFileExtensions: ["ts", "js"],
moduleNameMapper: {
"\\.(css|less)$": "identity-obj-proxy",
"^(.+?)\\.js$": "$1",
},
extensionsToTreatAsEsm: [".ts"],
};

export default config;
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"json to html"
],
"main": "dist/generate-report.js",
"files": [
"dist",
"README.md",
"LICENSE"
],
"license": "MIT",
"scripts": {
"release": "release-it",
Expand All @@ -23,8 +28,8 @@
"dev": "pnpm build -w",
"test": "node ./test/test.js",
"new:test": "pnpm node ./src/test/test.mjs",
"new:unit:test": "pnpm node src/runner.mjs",
"new:unit:coverage": "nyc pnpm new:unit:test",
"new:unit:test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
"new:unit:coverage": "pnpm new:unit:test --coverage",
"unit.test": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
"unit.test.coverage": "JASMINE_CONFIG_PATH=test/unit/jasmine.json nyc jasmine"
},
Expand All @@ -39,28 +44,27 @@
"homepage": "https://github.com/WasiqB/multiple-cucumber-html-reporter#readme",
"dependencies": {
"fs-extra": "^11.2.0",
"jsonfile": "^6.1.0",
"lodash": "^4.17.21",
"luxon": "^3.5.0",
"open": "^10.1.0",
"uuid": "^10.0.0"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/find": "^0.2.4",
"@types/fs-extra": "^11.0.4",
"@types/jasmine": "^5.1.4",
"@types/jest": "^29.5.12",
"@types/jsonfile": "^6.1.4",
"@types/lodash": "^4.17.7",
"@types/luxon": "^3.4.2",
"@types/node": "^22.5.4",
"@types/uuid": "^10.0.0",
"find": "^0.3.0",
"jasmine": "^5.3.0",
"nyc": "^17.0.0",
"jest": "^29.7.0",
"jsonfile": "^6.1.0",
"release-it": "^17.6.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"packageManager": "pnpm@9.5.0"
"packageManager": "pnpm@9.9.0"
}
Loading