diff --git a/.eslintignore b/.eslintignore index 2186947..42ceb9a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ dist/ lib/ -node_modules/ \ No newline at end of file +node_modules/ +jest.config.js diff --git a/.eslintrc.json b/.eslintrc.json index 5e93274..48214c7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,57 +1,68 @@ { - "plugins": ["jest", "@typescript-eslint"], - "extends": ["plugin:github/recommended"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "module", - "project": "./tsconfig.json" + "plugins": ["import", "jest", "@typescript-eslint"], + "extends": ["plugin:github/recommended"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 9, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "rules": { + "i18n-text/no-en": "off", + "eslint-comments/no-use": "off", + "import/no-namespace": "off", + "import/no-named-as-default": "off", + "no-shadow": "off", + "no-unused-vars": "off", + "prefer-template": "off", + "@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}], + "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/array-type": "error", + "@typescript-eslint/await-thenable": "error", + "@typescript-eslint/ban-ts-comment": "error", + "camelcase": "off", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], + "@typescript-eslint/func-call-spacing": ["error", "never"], + "@typescript-eslint/no-array-constructor": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-extraneous-class": "error", + "@typescript-eslint/no-for-in-array": "error", + "@typescript-eslint/no-inferrable-types": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-assertion": "warn", + "@typescript-eslint/no-unnecessary-qualifier": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-useless-constructor": "error", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-for-of": "warn", + "@typescript-eslint/prefer-function-type": "warn", + "@typescript-eslint/prefer-includes": "error", + "@typescript-eslint/prefer-string-starts-ends-with": "error", + "@typescript-eslint/promise-function-async": "error", + "@typescript-eslint/require-array-sort-compare": "error", + "@typescript-eslint/restrict-plus-operands": "error", + "semi": "off", + "@typescript-eslint/semi": ["error", "never"], + "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/unbound-method": "error" + }, + "env": { + "node": true, + "es6": true, + "jest/globals": true + }, + "settings": { + "import/parsers": { + "@typescript-eslint/parser": [".ts", ".tsx"] }, - "rules": { - "camelcase": "off", - "eslint-comments/no-use": "off", - "import/no-namespace": "off", - "no-shadow": "off", - "no-unused-vars": "off", - "prefer-template": "off", - "semi": [ "error", "never"], - "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], - "@typescript-eslint/array-type": "error", - "@typescript-eslint/await-thenable": "error", - "@typescript-eslint/ban-ts-comment": "error", - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}], - "@typescript-eslint/func-call-spacing": ["error", "never"], - "@typescript-eslint/no-array-constructor": "error", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-extraneous-class": "error", - "@typescript-eslint/no-for-in-array": "error", - "@typescript-eslint/no-inferrable-types": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-shadow": "error", - "@typescript-eslint/no-non-null-assertion": "warn", - "@typescript-eslint/no-unnecessary-qualifier": "error", - "@typescript-eslint/no-unnecessary-type-assertion": "error", - "@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}], - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "error", - "@typescript-eslint/prefer-for-of": "warn", - "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/prefer-includes": "error", - "@typescript-eslint/prefer-string-starts-ends-with": "error", - "@typescript-eslint/promise-function-async": "error", - "@typescript-eslint/require-array-sort-compare": "error", - "@typescript-eslint/restrict-plus-operands": "error", - "@typescript-eslint/semi": ["error", "never"], - "@typescript-eslint/type-annotation-spacing": "error", - "@typescript-eslint/unbound-method": "error" - }, - "env": { - "node": true, - "es6": true, - "jest/globals": true + "import/resolver": { + "typescript": { + "alwaysTryTypes": true // always try to resolve types under `@types` directory even it doesn't contain any source code, like `@types/unist` + } } } +} diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..eefb0da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,26 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'bug' +assignees: 'dorny,dharmendrasha' +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## To Reproduce +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +## Expected behavior +A clear and concise description of what you expected to happen. + +## Screenshots +If applicable, add screenshots to help explain your problem. + +## Additional context +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000..2d6adcd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,13 @@ +--- +name: Feature Request +about: Suggest a feature +title: '' +labels: 'enhancement' +assignees: 'dorny,dharmendrasha' +--- + +## Describe + +## Proposed solution + +## Alternatives considered diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d973c2e..61c651e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,10 @@ version: 2 updates: - # Enable version updates for npm - - package-ecosystem: 'npm' - # Look for `package.json` and `lock` files in the `root` directory - directory: '/' - # Check the npm registry for updates every day (weekdays) + - package-ecosystem: "npm" + directory: "/" schedule: - interval: 'monthly' - ignore: - - dependency-name: '@types/node' + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml new file mode 100644 index 0000000..c994dfa --- /dev/null +++ b/.github/workflows/check-dist.yml @@ -0,0 +1,53 @@ +# `dist/index.js` is a special file in Actions. +# When you reference an action with `uses:` in a workflow, +# `index.js` is the code that will run. +# For our project, we generate this file through a build process from other source files. +# We need to make sure the checked-in `index.js` actually matches what we expect it to be. +name: Check dist/ + +on: + push: + branches: + - main + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + workflow_dispatch: + +jobs: + check-dist: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Set Node.js + uses: actions/setup-node@v6 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: npm ci + + - name: Rebuild the dist/ directory + run: | + npm run build + npm run package + + - name: Compare the expected and actual dist/ directories + run: | + if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then + echo "Detected uncommitted changes after build. See status below:" + git diff + exit 1 + fi + id: diff + + # If index.js was different than expected, upload the expected version as an artifact + - uses: actions/upload-artifact@v5 + if: ${{ failure() && steps.diff.conclusion == 'failure' }} + with: + name: dist + path: dist/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57144fc..aeec96d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,10 @@ jobs: name: Build & Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version-file: '.nvmrc' - run: npm ci - run: npm run build - run: npm run format-check @@ -21,16 +24,8 @@ jobs: - run: npm test - name: Upload test results - if: success() || failure() - uses: actions/upload-artifact@v2 + if: ${{ !cancelled() }} + uses: actions/upload-artifact@v5 with: name: test-results path: __tests__/__results__/*.xml - - - name: Create test report - uses: ./ - if: success() || failure() - with: - name: JEST Tests - path: __tests__/__results__/*.xml - reporter: jest-junit diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml new file mode 100644 index 0000000..c1875a9 --- /dev/null +++ b/.github/workflows/manual-run.yml @@ -0,0 +1,22 @@ +name: Manual run + +on: + workflow_dispatch: + +jobs: + check-dist: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - run: npm ci + - run: npm run build + - run: npm test + + - name: Create test report + uses: ./ + if: ${{ !cancelled() }} + with: + name: JEST Tests + path: __tests__/__results__/*.xml + reporter: jest-junit diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 1cf8442..11b266a 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -11,7 +11,7 @@ jobs: name: Workflow test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: ./ with: artifact: test-results diff --git a/.gitignore b/.gitignore index 639696a..f43ecf7 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,5 @@ lib/**/* # Project specific __tests__/__results__ + +.idea diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..3f71d87 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,13 @@ +{ + "blanks-around-headings": false, + "blanks-around-lists": false, + "blanks-around-tables": false, + "blanks-around-fences": false, + "no-bare-urls": false, + "line-length": false, + "ul-style": false, + "no-inline-html": false, + "no-multiple-blanks": { + "maximum": 3 + } +} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..9a2a0e2 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce10e7..b0badd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,100 @@ # Changelog +## 2.3.0 +* Feature: Add Python support with `python-xunit` reporter (pytest) https://github.com/dorny/test-reporter/pull/643 +* Feature: Add pytest traceback parsing and `directory-mapping` option https://github.com/dorny/test-reporter/pull/238 +* Performance: Update sax.js to fix large XML file parsing https://github.com/dorny/test-reporter/pull/681 +* Documentation: Complete documentation for all supported reporters https://github.com/dorny/test-reporter/pull/691 +* Security: Bump js-yaml and mocha in /reports/mocha (fixes prototype pollution) https://github.com/dorny/test-reporter/pull/682 + +## 2.2.0 +* Feature: Add collapsed option to control report summary visibility https://github.com/dorny/test-reporter/pull/664 +* Fix badge encoding for values including underscore and hyphens https://github.com/dorny/test-reporter/pull/672 +* Fix missing `report-title` attribute in action definition https://github.com/dorny/test-reporter/pull/637 +* Refactor variable names to fix shadowing issues https://github.com/dorny/test-reporter/pull/630 + +## 2.1.1 +* Fix error when a TestMethod element does not have a className attribute in a trx file https://github.com/dorny/test-reporter/pull/623 +* Add stack trace from trx to summary https://github.com/dorny/test-reporter/pull/615 +* List only failed tests https://github.com/dorny/test-reporter/pull/606 +* Add type definitions to `github-utils.ts` https://github.com/dorny/test-reporter/pull/604 +* Avoid split on undefined https://github.com/dorny/test-reporter/pull/258 +* Return links to summary report https://github.com/dorny/test-reporter/pull/588 +* Add step summary short summary https://github.com/dorny/test-reporter/pull/589 +* Fix for empty TRX TestDefinitions https://github.com/dorny/test-reporter/pull/582 +* Increase step summary limit to 1MiB https://github.com/dorny/test-reporter/pull/581 +* Fix input description for list options https://github.com/dorny/test-reporter/pull/572 + +## 2.1.0 +* Feature: Add summary title https://github.com/dorny/test-reporter/pull/568 +* Feature: Add Golang test parser https://github.com/dorny/test-reporter/pull/571 +* Increase step summary limit to 1MiB https://github.com/dorny/test-reporter/pull/581 +* Fix for empty TRX TestDefinitions https://github.com/dorny/test-reporter/pull/582 +* Fix input description for list options https://github.com/dorny/test-reporter/pull/572 +* Update npm packages https://github.com/dorny/test-reporter/pull/583 + +## 2.0.0 +* Parse JUnit report with detailed message in failure https://github.com/dorny/test-reporter/pull/559 +* Support displaying test results in markdown using GitHub Actions Job Summaries https://github.com/dorny/test-reporter/pull/383 + +## 1.9.1 +* Fix problematic retransmission of authentication token https://github.com/dorny/test-reporter/pull/438 +* Report correct number of tests in Dart https://github.com/dorny/test-reporter/pull/426 +* Number of completed tests mismatches passed/failed https://github.com/dorny/test-reporter/issues/319 + +## 1.9.0 +* Add support for Rspec (Ruby) https://github.com/dorny/test-reporter/pull/398 + +## 1.8.0 +* Add `SwiftXunitParser` class based on `JavaJunitParser` for `swift-xunit` reporter https://github.com/dorny/test-reporter/pull/317 +* Use NodeJS 18 LTS as default runtime https://github.com/dorny/test-reporter/pull/332 +* Escape `<>` characters in suite name https://github.com/dorny/test-reporter/pull/236 +* Update actions runtime to Node20 https://github.com/dorny/test-reporter/pull/315 +* Update check title and remove icon https://github.com/dorny/test-reporter/pull/144 + +## 1.7.0 +* Fix #199: Use ✅ instead of ✔️ for better cross platform look by @petrdvorak in https://github.com/dorny/test-reporter/pull/200 +* Verify content of dist/ folder matches build output by @dorny in https://github.com/dorny/test-reporter/pull/207 +* Gracefully handle empty nested testsuite elements for JUnit. by @rvdlaarschot in https://github.com/dorny/test-reporter/pull/193 +* Gracefully handle empty failure tags by @haudren-woven in https://github.com/dorny/test-reporter/pull/213 +* Fix #208 - java-junit: show annotations on PR changed files by @atsu85 in https://github.com/dorny/test-reporter/pull/209 +* Only report failure if fail-on-error is set by @trond-snekvik in https://github.com/dorny/test-reporter/pull/214 +* Improve clarity on configuring for forkable repos by @abelbraaksma in https://github.com/dorny/test-reporter/pull/211 +* Suppress "Processing test results from" log by @vasanthdharmaraj in https://github.com/dorny/test-reporter/pull/179 +* Skip listing of files if error parsing is disabled by @dorny in https://github.com/dorny/test-reporter/pull/216 +* Correct typo in docs by @tangowithfoxtrot in https://github.com/dorny/test-reporter/pull/254 +* update dependencies by @j-catania in https://github.com/dorny/test-reporter/pull/269 +* Add permissions to example yml files by @TurnrDev in https://github.com/dorny/test-reporter/pull/263 +* add feature fail-on-empty by @gdams in https://github.com/dorny/test-reporter/pull/243 +* Add dependabot configuration by @yeikel in https://github.com/dorny/test-reporter/pull/228 +* Bump ws from 7.3.1 to 7.5.9 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/265 +* Bump actions/checkout from 2 to 4 by @dependabot in https://github.com/dorny/test-reporter/pull/279 +* Add new output for url url html by @luisito666 in https://github.com/dorny/test-reporter/pull/242 +* Update README.md by @IanMoroney in https://github.com/dorny/test-reporter/pull/158 +* Update jest-Junit part of Readme by @ryancasburn-KAI in https://github.com/dorny/test-reporter/pull/176 +* fix: default-valued fields are not mandatory by @TomerFi in https://github.com/dorny/test-reporter/pull/172 +* Bump ansi-regex from 4.1.0 to 4.1.1 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/278 +* Bump decode-uri-component from 0.2.0 to 0.2.2 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/276 +* Bump minimist from 1.2.5 to 1.2.8 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/275 +* Bump qs from 6.5.2 to 6.5.3 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/272 +* Bump json5 from 2.1.3 to 2.2.3 in /reports/jest by @dependabot in https://github.com/dorny/test-reporter/pull/271 +* Bump ansi-regex from 3.0.0 to 3.0.1 in /reports/mocha by @dependabot in https://github.com/dorny/test-reporter/pull/270 +* declare 'url' and 'url_html' as action outputs by @micha-one in https://github.com/dorny/test-reporter/pull/287 +* Avoid split on undefined by @cazou in https://github.com/dorny/test-reporter/pull/258 + +## v1.6.0 +- [Update to node16 + recent versions of core and exec packages](https://github.com/dorny/test-reporter/pull/203) +- [Update all dependencies to latest versions](https://github.com/dorny/test-reporter/pull/186) +- [Fix tests on non us-EN local env](https://github.com/dorny/test-reporter/pull/185) + +## v1.5.0 +- [Add option to convert backslashes in path pattern to forward slashes](https://github.com/dorny/test-reporter/pull/128) +- [Add option to generate only the summary from processed test results files](https://github.com/dorny/test-reporter/pull/123) + +## v1.4.3 +- [Patch java-junit to handle missing time field](https://github.com/dorny/test-reporter/pull/115) +- [Fix dart-json parsing broken by print message](https://github.com/dorny/test-reporter/pull/114) + ## v1.4.2 - [Fix dotnet-trx parsing of passed tests with non-empty error info](https://github.com/dorny/test-reporter/commit/43d89d5ee509bcef7bd0287aacc0c4a4fb9c1657) diff --git a/README.md b/README.md index 92e2d98..d900926 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,26 @@ This [Github Action](https://github.com/features/actions) displays test results from popular testing frameworks directly in GitHub. -✔️ Parses test results in XML or JSON format and creates nice report as Github Check Run +✔️ Parses test results in XML or JSON format and creates nice report as GitHub Check Run or GitHub Actions job summaries ✔️ Annotates code where it failed based on message and stack trace captured during test execution ✔️ Provides final `conclusion` and counts of `passed`, `failed` and `skipped` tests as output parameters **How it looks:** -|![](assets/fluent-validation-report.png)|![](assets/provider-error-summary.png)|![](assets/provider-error-details.png)|![](assets/mocha-groups.png)| +|![Summary showing test run with all tests passed, including details such as test file names, number of passed, failed, and skipped tests, and execution times. The interface is dark-themed and displays a green badge indicating 3527 passed and 4 skipped tests.](assets/fluent-validation-report.png)|![Summary showing test run with a failed unit test. The summary uses a dark background and highlights errors in red for quick identification.](assets/provider-error-summary.png)|![GitHub Actions annotation showing details of a failed unit test with a detailed error message, stack trace, and code annotation.](assets/provider-error-details.png)|![Test cases written in Mocha framework with a list of expectations for each test case. The table format and color-coded badges help users quickly assess test suite health.](assets/mocha-groups.png)| |:--:|:--:|:--:|:--:| **Supported languages / frameworks:** -- .NET / [xUnit](https://xunit.net/) / [NUnit](https://nunit.org/) / [MSTest](https://github.com/Microsoft/testfx-docs) +- .NET / [dotnet test](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#examples) ( [xUnit](https://xunit.net/) / [NUnit](https://nunit.org/) / [MSTest](https://github.com/Microsoft/testfx-docs) ) - Dart / [test](https://pub.dev/packages/test) - Flutter / [test](https://pub.dev/packages/test) +- Go / [go test](https://pkg.go.dev/testing) - Java / [JUnit](https://junit.org/) - JavaScript / [JEST](https://jestjs.io/) / [Mocha](https://mochajs.org/) +- Python / [pytest](https://docs.pytest.org/en/stable/) / [unittest](https://docs.python.org/3/library/unittest.html) +- Ruby / [RSpec](https://rspec.info/) +- Swift / xUnit For more information see [Supported formats](#supported-formats) section. @@ -33,18 +37,22 @@ If that's fine for you, using this action is as simple as: on: pull_request: push: +permissions: + contents: read + actions: read + checks: write jobs: build-test: name: Build & Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 # checkout the repo + - uses: actions/checkout@v4 # checkout the repo - run: npm ci # install packages - run: npm test # run tests (configured to use jest-junit reporter) - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() # run this step even if previous step failed + uses: dorny/test-reporter@v2 + if: ${{ !cancelled() }} # run this step even if previous step failed with: name: JEST Tests # Name of the check run which will be created path: reports/jest-*.xml # Path to test results @@ -58,6 +66,8 @@ To workaround this security restriction, it's required to use two separate workf 1. `CI` runs in the context of the PR head branch with the read-only token. It executes the tests and uploads test results as a build artifact 2. `Test Report` runs in the context of the repository main branch with read/write token. It will download test results and create reports +The second workflow will only run after it has been merged into your default branch (typically `main` or `master`), it won't run in a PR unless after the workflow file is part of that branch. + **PR head branch:** *.github/workflows/ci.yml* ```yaml name: 'CI' @@ -67,11 +77,11 @@ jobs: build-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 # checkout the repo + - uses: actions/checkout@v4 # checkout the repo - run: npm ci # install packages - run: npm test # run tests (configured to use jest-junit reporter) - - uses: actions/upload-artifact@v2 # upload test results - if: success() || failure() # run this step even if previous step failed + - uses: actions/upload-artifact@v4 # upload test results + if: ${{ !cancelled() }} # run this step even if previous step failed with: name: test-results path: jest-junit.xml @@ -84,11 +94,15 @@ on: workflows: ['CI'] # runs after CI workflow types: - completed +permissions: + contents: read + actions: read + checks: write jobs: report: runs-on: ubuntu-latest steps: - - uses: dorny/test-reporter@v1 + - uses: dorny/test-reporter@v2 with: artifact: test-results # artifact name name: JEST Tests # Name of the check run which will be created @@ -99,7 +113,7 @@ jobs: ## Usage ```yaml -- uses: dorny/test-reporter@v1 +- uses: dorny/test-reporter@v2 with: # Name or regex of artifact containing test results @@ -114,23 +128,52 @@ jobs: # Name of the Check Run which will be created name: '' - # Coma separated list of paths to test results + # Comma-separated list of paths to test results # Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob) # All matched result files must be of the same format path: '' + # The fast-glob library that is internally used interprets backslashes as escape characters. + # If enabled, all backslashes in provided path will be replaced by forward slashes and act as directory separators. + # It might be useful when path input variable is composed dynamically from existing directory paths on Windows. + path-replace-backslashes: 'false' + # Format of test results. Supported options: # dart-json + # dotnet-nunit # dotnet-trx # flutter-json + # golang-json # java-junit # jest-junit # mocha-json + # python-xunit + # rspec-json + # swift-xunit reporter: '' + # Allows you to generate only the summary. + # If enabled, the report will contain a table listing each test results file and the number of passed, failed, and skipped tests. + # Detailed listing of test suites and test cases will be skipped. + only-summary: 'false' + + # Allows you to generate reports for Actions Summary + # https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/ + use-actions-summary: 'true' + + # Optionally specify a title (Heading level 1) for the report. Leading and trailing whitespace are ignored. + # This is useful for separating your test report from other sections in the build summary. + # If omitted or set to whitespace/empty, no title will be printed. + report-title: '' + + # Customize the title of badges shown for each Actions Summary. + # Useful when distinguish summaries for tests ran in multiple Actions steps. + badge-title: 'tests' + # Limits which test suites are listed: # all # failed + # none list-suites: 'all' # Limits which test cases are listed: @@ -146,6 +189,9 @@ jobs: # Set action as failed if test report contains any failed test fail-on-error: 'true' + # Set this action as failed if no test results were found + fail-on-empty: 'true' + # Relative path under $GITHUB_WORKSPACE where the repository was checked out. working-directory: '' @@ -162,6 +208,8 @@ jobs: | failed | Count of failed tests | | skipped | Count of skipped tests | | time | Test execution time [ms] | +| url | Check run URL | +| url_html | Check run URL HTML | ## Supported formats @@ -209,6 +257,20 @@ Supported testing frameworks: For more information see [dotnet test](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#examples) +
+ dotnet-nunit + +Test execution must be configured to generate [NUnit3](https://docs.nunit.org/articles/nunit/technical-notes/usage/Test-Result-XML-Format.html) XML test results. +Install the [NUnit3TestAdapter](https://www.nuget.org/packages/NUnit3TestAdapter) package (required; it registers the `nunit` logger for `dotnet test`), then run tests with: + +`dotnet test --logger "nunit;LogFileName=test-results.xml"` + +Supported testing frameworks: +- [NUnit](https://nunit.org/) + +For more information see [dotnet test](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#examples) +
+
flutter-json @@ -236,6 +298,13 @@ For more information see:
+
+ golang-json + +You must use the `-json` flag and output the results to a file (ex: `go test -json > testresults.json`) + +
+
java-junit (Experimental) @@ -246,14 +315,14 @@ Some heuristic was necessary to figure out the mapping between the line in the s
- jest-Junit + jest-junit -[JEST](https://jestjs.io/) testing framework support requires the usage of [jest-Junit](https://github.com/jest-community/jest-Junit) reporter. +[JEST](https://jestjs.io/) testing framework support requires the usage of [jest-junit](https://github.com/jest-community/jest-junit) reporter. It will create test results in Junit XML format which can be then processed by this action. You can use the following example configuration in `package.json`: ```json "scripts": { - "test": "jest --ci --reporters=default --reporters=jest-Junit" + "test": "jest --ci --reporters=default --reporters=jest-junit" }, "devDependencies": { "jest": "^26.5.3", @@ -280,25 +349,72 @@ Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, ` - Mocha version [v7.2.0](https://github.com/mochajs/mocha/releases/tag/v7.2.0) or higher - Usage of [json](https://mochajs.org/#json) reporter. -You can use the following example configuration in `package.json`: +For Mocha >= [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0), you can use the following example configuration in `package.json`: +```json +"scripts": { + "test": "mocha --reporter json --reporter-option output=test-results.json" +} +``` + +For Mocha < v9.1, the command should look like this: ```json "scripts": { "test": "mocha --reporter json > test-results.json" } ``` +Additionally, test processing might fail if any of your tests write anything on standard output. +Before version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0), Mocha doesn't have the option to store `json` output directly to the file, and we have to rely on redirecting its standard output ([mocha#4607](https://github.com/mochajs/mocha/pull/4607)). +Please update Mocha to version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0) or above if you encounter this issue. +
-Test processing might fail if any of your tests write anything on standard output. -Mocha, unfortunately, doesn't have the option to store `json` output directly to the file, and we have to rely on redirecting its standard output. -There is a work in progress to fix it: [mocha#4607](https://github.com/mochajs/mocha/pull/4607) +
+ python-xunit (Experimental) + +Support for Python test results in xUnit format is experimental - should work but it was not extensively tested. + +For **pytest** support, configure [JUnit XML output](https://docs.pytest.org/en/stable/how-to/output.html#creating-junitxml-format-files) and run with the `--junit-xml` option, which also lets you specify the output path for test results. + +```shell +pytest --junit-xml=test-report.xml +``` + +For **unittest** support, use a test runner that outputs the JUnit report format, such as [unittest-xml-reporting](https://pypi.org/project/unittest-xml-reporting/). +
+ +
+ rspec-json + +[RSpec](https://rspec.info/) testing framework support requires the usage of JSON formatter. +You can configure RSpec to output JSON format by using the `--format json` option and redirecting to a file: + +```shell +rspec --format json --out rspec-results.json +``` + +Or configure it in `.rspec` file: +``` +--format json +--out rspec-results.json +``` + +For more information see: +- [RSpec documentation](https://rspec.info/) +- [RSpec Formatters](https://relishapp.com/rspec/rspec-core/docs/formatters) +
+ +
+ swift-xunit (Experimental) + +Support for Swift test results in xUnit format is experimental - should work but it was not extensively tested.
## GitHub limitations Unfortunately, there are some known issues and limitations caused by GitHub API: -- Test report (i.e. Check Run summary) is markdown text. No custom styling or HTML is possible. +- Test report (i.e. build summary) is Markdown text. No custom styling or HTML is possible. - Maximum report size is 65535 bytes. Input parameters `list-suites` and `list-tests` will be automatically adjusted if max size is exceeded. -- Test report can't reference any additional files (e.g. screenshots). You can use `actions/upload-artifact@v2` to upload them and inspect them manually. +- Test report can't reference any additional files (e.g. screenshots). You can use `actions/upload-artifact@v4` to upload them and inspect them manually. - Check Runs are created for specific commit SHA. It's not possible to specify under which workflow test report should belong if more workflows are running for the same SHA. Thanks to this GitHub "feature" it's possible your test report will appear in an unexpected place in GitHub UI. For more information, see [#67](https://github.com/dorny/test-reporter/issues/67). diff --git a/__tests__/__outputs__/dart-json.md b/__tests__/__outputs__/dart-json.md index 80a2846..2b7ec09 100644 --- a/__tests__/__outputs__/dart-json.md +++ b/__tests__/__outputs__/dart-json.md @@ -1,14 +1,17 @@ ![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical) -## ❌ fixtures/dart-json.json +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/dart-json.json](#user-content-r0)|1 ✅|4 ❌|1 ⚪|4s| +## ❌ fixtures/dart-json.json **6** tests were completed in **4s** with **1** passed, **4** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[test/main_test.dart](#r0s0)|1✔️|3❌||74ms| -|[test/second_test.dart](#r0s1)||1❌|1✖️|51ms| -### ❌ test/main_test.dart +|[test/main_test.dart](#user-content-r0s0)|1 ✅|3 ❌||74ms| +|[test/second_test.dart](#user-content-r0s1)||1 ❌|1 ⚪|51ms| +### ❌ test/main_test.dart ``` Test 1 - ✔️ Passing test + ✅ Passing test Test 1 Test 1.1 ❌ Failing test Expected: <2> @@ -20,9 +23,9 @@ Test 2 ❌ Exception in test Exception: Some error ``` -### ❌ test/second_test.dart +### ❌ test/second_test.dart ``` ❌ Timeout test TimeoutException after 0:00:00.000001: Test timed out after 0 seconds. -✖️ Skipped test +⚪ Skipped test ``` \ No newline at end of file diff --git a/__tests__/__outputs__/dotnet-nunit.md b/__tests__/__outputs__/dotnet-nunit.md new file mode 100644 index 0000000..a0985f5 --- /dev/null +++ b/__tests__/__outputs__/dotnet-nunit.md @@ -0,0 +1,31 @@ +![Tests failed](https://img.shields.io/badge/tests-3%20passed%2C%205%20failed%2C%201%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/dotnet-nunit.xml](#user-content-r0)|3 ✅|5 ❌|1 ⚪|230ms| +## ❌ fixtures/dotnet-nunit.xml +**9** tests were completed in **230ms** with **3** passed, **5** failed and **1** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[DotnetTests.NUnitV3Tests.dll.DotnetTests.XUnitTests](#user-content-r0s0)|3 ✅|5 ❌|1 ⚪|69ms| +### ❌ DotnetTests.NUnitV3Tests.dll.DotnetTests.XUnitTests +``` +CalculatorTests + ✅ Is_Even_Number(2) + ❌ Is_Even_Number(3) + Expected: True + But was: False + + ❌ Exception_In_TargetTest + System.DivideByZeroException : Attempted to divide by zero. + ❌ Exception_In_Test + System.Exception : Test + ❌ Failing_Test + Expected: 3 + But was: 2 + + ✅ Passing_Test + ✅ Passing_Test_With_Description + ⚪ Skipped_Test + ❌ Timeout_Test + +``` \ No newline at end of file diff --git a/__tests__/__outputs__/dotnet-trx-only-failed.md b/__tests__/__outputs__/dotnet-trx-only-failed.md new file mode 100644 index 0000000..5eeaec5 --- /dev/null +++ b/__tests__/__outputs__/dotnet-trx-only-failed.md @@ -0,0 +1,34 @@ +![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/dotnet-trx.trx](#user-content-r0)|5 ✅|5 ❌|1 ⚪|1s| +## ❌ fixtures/dotnet-trx.trx +**11** tests were completed in **1s** with **5** passed, **5** failed and **1** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[DotnetTests.XUnitTests.CalculatorTests](#user-content-r0s0)|5 ✅|5 ❌|1 ⚪|118ms| +### ❌ DotnetTests.XUnitTests.CalculatorTests +``` +❌ Exception_In_TargetTest + System.DivideByZeroException : Attempted to divide by zero. + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.Unit\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 33 +❌ Exception_In_Test + System.Exception : Test + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 39 +❌ Failing_Test + Assert.Equal() Failure + Expected: 3 + Actual: 2 + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 27 +❌ Is_Even_Number(i: 3) + Assert.True() Failure + Expected: True + Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 59 +❌ Should be even number(i: 3) + Assert.True() Failure + Expected: True + Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 67 +``` \ No newline at end of file diff --git a/__tests__/__outputs__/dotnet-trx.md b/__tests__/__outputs__/dotnet-trx.md index ddaaecd..40bcaf2 100644 --- a/__tests__/__outputs__/dotnet-trx.md +++ b/__tests__/__outputs__/dotnet-trx.md @@ -1,31 +1,40 @@ ![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%205%20failed%2C%201%20skipped-critical) -## ❌ fixtures/dotnet-trx.trx +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/dotnet-trx.trx](#user-content-r0)|5 ✅|5 ❌|1 ⚪|1s| +## ❌ fixtures/dotnet-trx.trx **11** tests were completed in **1s** with **5** passed, **5** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[DotnetTests.XUnitTests.CalculatorTests](#r0s0)|5✔️|5❌|1✖️|118ms| -### ❌ DotnetTests.XUnitTests.CalculatorTests +|[DotnetTests.XUnitTests.CalculatorTests](#user-content-r0s0)|5 ✅|5 ❌|1 ⚪|118ms| +### ❌ DotnetTests.XUnitTests.CalculatorTests ``` -✔️ Custom Name +✅ Custom Name ❌ Exception_In_TargetTest System.DivideByZeroException : Attempted to divide by zero. + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.Unit\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 33 ❌ Exception_In_Test System.Exception : Test + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 39 ❌ Failing_Test Assert.Equal() Failure Expected: 3 Actual: 2 -✔️ Is_Even_Number(i: 2) + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 27 +✅ Is_Even_Number(i: 2) ❌ Is_Even_Number(i: 3) Assert.True() Failure Expected: True Actual: False -✔️ Passing_Test -✔️ Should be even number(i: 2) + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 59 +✅ Passing_Test +✅ Should be even number(i: 2) ❌ Should be even number(i: 3) Assert.True() Failure Expected: True Actual: False -✖️ Skipped_Test -✔️ Timeout_Test + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\Users\Michal\Workspace\dorny\test-reporter\reports\dotnet\DotnetTests.XUnitTests\CalculatorTests.cs:line 67 +⚪ Skipped_Test +✅ Timeout_Test ``` \ No newline at end of file diff --git a/__tests__/__outputs__/dotnet-xunitv3.md b/__tests__/__outputs__/dotnet-xunitv3.md new file mode 100644 index 0000000..f27f9e2 --- /dev/null +++ b/__tests__/__outputs__/dotnet-xunitv3.md @@ -0,0 +1,26 @@ +![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%203%20failed-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/dotnet-xunitv3.trx](#user-content-r0)|1 ✅|3 ❌||267ms| +## ❌ fixtures/dotnet-xunitv3.trx +**4** tests were completed in **267ms** with **1** passed, **3** failed and **0** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[DotnetTests.XUnitV3Tests.FixtureTests](#user-content-r0s0)|1 ✅|1 ❌||18ms| +|[Unclassified](#user-content-r0s1)||2 ❌||0ms| +### ❌ DotnetTests.XUnitV3Tests.FixtureTests +``` +❌ Failing_Test + Assert.Null() Failure: Value is not null + Expected: null + Actual: Fixture { } + at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25 + at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) + at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) +✅ Passing_Test +``` +### ❌ Unclassified +``` +❌ [Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test)] +❌ [Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Passing_Test)] +``` \ No newline at end of file diff --git a/__tests__/__outputs__/fluent-validation-test-results.md b/__tests__/__outputs__/fluent-validation-test-results.md index 9f35f00..83d0503 100644 --- a/__tests__/__outputs__/fluent-validation-test-results.md +++ b/__tests__/__outputs__/fluent-validation-test-results.md @@ -1,1057 +1,1063 @@ ![Tests passed successfully](https://img.shields.io/badge/tests-803%20passed%2C%201%20skipped-success) -## ✔️ fixtures/external/FluentValidation.Tests.trx +
Expand for details + +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/FluentValidation.Tests.trx](#user-content-r0)|803 ✅||1 ⚪|4s| +## ✅ fixtures/external/FluentValidation.Tests.trx **804** tests were completed in **4s** with **803** passed, **0** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[FluentValidation.Tests.AbstractValidatorTester](#r0s0)|35✔️|||12ms| -|[FluentValidation.Tests.AccessorCacheTests](#r0s1)|4✔️||1✖️|4ms| -|[FluentValidation.Tests.AssemblyScannerTester](#r0s2)|2✔️|||2ms| -|[FluentValidation.Tests.CascadingFailuresTester](#r0s3)|38✔️|||23ms| -|[FluentValidation.Tests.ChainedValidationTester](#r0s4)|13✔️|||6ms| -|[FluentValidation.Tests.ChainingValidatorsTester](#r0s5)|3✔️|||1ms| -|[FluentValidation.Tests.ChildRulesTests](#r0s6)|2✔️|||7ms| -|[FluentValidation.Tests.CollectionValidatorWithParentTests](#r0s7)|16✔️|||13ms| -|[FluentValidation.Tests.ComplexValidationTester](#r0s8)|17✔️|||26ms| -|[FluentValidation.Tests.ConditionTests](#r0s9)|18✔️|||9ms| -|[FluentValidation.Tests.CreditCardValidatorTests](#r0s10)|2✔️|||2ms| -|[FluentValidation.Tests.CustomFailureActionTester](#r0s11)|3✔️|||1ms| -|[FluentValidation.Tests.CustomMessageFormatTester](#r0s12)|6✔️|||3ms| -|[FluentValidation.Tests.CustomValidatorTester](#r0s13)|10✔️|||6ms| -|[FluentValidation.Tests.DefaultValidatorExtensionTester](#r0s14)|30✔️|||38ms| -|[FluentValidation.Tests.EmailValidatorTests](#r0s15)|36✔️|||18ms| -|[FluentValidation.Tests.EmptyTester](#r0s16)|9✔️|||5ms| -|[FluentValidation.Tests.EnumValidatorTests](#r0s17)|12✔️|||24ms| -|[FluentValidation.Tests.EqualValidatorTests](#r0s18)|10✔️|||3ms| -|[FluentValidation.Tests.ExactLengthValidatorTester](#r0s19)|6✔️|||2ms| -|[FluentValidation.Tests.ExclusiveBetweenValidatorTests](#r0s20)|19✔️|||6ms| -|[FluentValidation.Tests.ExtensionTester](#r0s21)|4✔️|||1ms| -|[FluentValidation.Tests.ForEachRuleTests](#r0s22)|34✔️|||47ms| -|[FluentValidation.Tests.GreaterThanOrEqualToValidatorTester](#r0s23)|14✔️|||5ms| -|[FluentValidation.Tests.GreaterThanValidatorTester](#r0s24)|13✔️|||4ms| -|[FluentValidation.Tests.InclusiveBetweenValidatorTests](#r0s25)|18✔️|||4ms| -|[FluentValidation.Tests.InheritanceValidatorTest](#r0s26)|11✔️|||18ms| -|[FluentValidation.Tests.InlineValidatorTester](#r0s27)|1✔️|||2ms| -|[FluentValidation.Tests.LanguageManagerTests](#r0s28)|21✔️|||28ms| -|[FluentValidation.Tests.LengthValidatorTests](#r0s29)|16✔️|||17ms| -|[FluentValidation.Tests.LessThanOrEqualToValidatorTester](#r0s30)|13✔️|||4ms| -|[FluentValidation.Tests.LessThanValidatorTester](#r0s31)|16✔️|||6ms| -|[FluentValidation.Tests.LocalisedMessagesTester](#r0s32)|6✔️|||3ms| -|[FluentValidation.Tests.LocalisedNameTester](#r0s33)|2✔️|||1ms| -|[FluentValidation.Tests.MemberAccessorTests](#r0s34)|9✔️|||5ms| -|[FluentValidation.Tests.MessageFormatterTests](#r0s35)|10✔️|||2ms| -|[FluentValidation.Tests.ModelLevelValidatorTests](#r0s36)|2✔️|||1ms| -|[FluentValidation.Tests.NameResolutionPluggabilityTester](#r0s37)|3✔️|||2ms| -|[FluentValidation.Tests.NotEmptyTester](#r0s38)|10✔️|||7ms| -|[FluentValidation.Tests.NotEqualValidatorTests](#r0s39)|11✔️|||7ms| -|[FluentValidation.Tests.NotNullTester](#r0s40)|5✔️|||1ms| -|[FluentValidation.Tests.NullTester](#r0s41)|5✔️|||2ms| -|[FluentValidation.Tests.OnFailureTests](#r0s42)|10✔️|||8ms| -|[FluentValidation.Tests.PredicateValidatorTester](#r0s43)|5✔️|||2ms| -|[FluentValidation.Tests.PropertyChainTests](#r0s44)|7✔️|||1ms| -|[FluentValidation.Tests.RegularExpressionValidatorTests](#r0s45)|15✔️|||6ms| -|[FluentValidation.Tests.RuleBuilderTests](#r0s46)|29✔️|||96ms| -|[FluentValidation.Tests.RuleDependencyTests](#r0s47)|14✔️|||3s| -|[FluentValidation.Tests.RulesetTests](#r0s48)|21✔️|||14ms| -|[FluentValidation.Tests.ScalePrecisionValidatorTests](#r0s49)|6✔️|||4ms| -|[FluentValidation.Tests.SharedConditionTests](#r0s50)|42✔️|||42ms| -|[FluentValidation.Tests.StandalonePropertyValidationTester](#r0s51)|1✔️|||0ms| -|[FluentValidation.Tests.StringEnumValidatorTests](#r0s52)|10✔️|||5ms| -|[FluentValidation.Tests.TrackingCollectionTests](#r0s53)|3✔️|||2ms| -|[FluentValidation.Tests.TransformTests](#r0s54)|4✔️|||3ms| -|[FluentValidation.Tests.UserSeverityTester](#r0s55)|7✔️|||3ms| -|[FluentValidation.Tests.UserStateTester](#r0s56)|4✔️|||3ms| -|[FluentValidation.Tests.ValidateAndThrowTester](#r0s57)|14✔️|||25ms| -|[FluentValidation.Tests.ValidationResultTests](#r0s58)|8✔️|||8ms| -|[FluentValidation.Tests.ValidatorDescriptorTester](#r0s59)|5✔️|||1ms| -|[FluentValidation.Tests.ValidatorSelectorTests](#r0s60)|10✔️|||9ms| -|[FluentValidation.Tests.ValidatorTesterTester](#r0s61)|73✔️|||74ms| -### ✔️ FluentValidation.Tests.AbstractValidatorTester -``` -✔️ Can_replace_default_errorcode_resolver -✔️ CanValidateInstancesOfType_returns_false_when_comparing_against_some_other_type -✔️ CanValidateInstancesOfType_returns_true_when_comparing_against_same_type -✔️ CanValidateInstancesOfType_returns_true_when_comparing_against_subclass -✔️ Default_error_code_should_be_class_name -✔️ OverridePropertyName_should_override_property_name -✔️ OverridePropertyName_with_lambda_should_override_property_name -✔️ PreValidate_bypasses_nullcheck_on_instance -✔️ RuleForeach_with_null_instances -✔️ Should_be_valid_when_there_are_no_failures_for_single_property -✔️ Should_not_main_state -✔️ Should_throw_for_non_member_expression_when_validating_single_property -✔️ Should_throw_when_rule_is_null -✔️ Should_validate_public_Field -✔️ Should_validate_single_Field -✔️ Should_validate_single_property -✔️ Should_validate_single_property_where_invalid_property_as_string -✔️ Should_validate_single_property_where_property_as_string -✔️ Uses_named_parameters_to_validate_ruleset -✔️ Validates_single_property_by_path -✔️ Validates_type_when_using_non_generic_validate_overload -✔️ When_the_validators_fail_then_the_errors_Should_be_accessible_via_the_errors_property -✔️ When_the_validators_fail_then_validatorrunner_should_return_false -✔️ When_the_Validators_pass_then_the_validatorRunner_should_return_true -✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: ) -✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: AnotherInt Test Message) -✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: ) -✔️ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: AnotherInt Test Message) -✔️ WhenPreValidationReturnsTrue_ValidatorsGetHit_Validate -✔️ WhenPreValidationReturnsTrue_ValidatorsGetHit_ValidateAsync -✔️ WithErrorCode_should_override_error_code -✔️ WithMessage_and_WithErrorCode_should_override_error_message_and_error_code -✔️ WithMessage_should_override_error_message -✔️ WithName_should_override_field_name -✔️ WithName_should_override_field_name_with_value_from_other_property -``` -### ✔️ FluentValidation.Tests.AccessorCacheTests -``` -✖️ Benchmark -✔️ Equality_comparison_check -✔️ Gets_accessor -✔️ Gets_member_for_nested_property -✔️ Identifies_if_memberexp_acts_on_model_instance -``` -### ✔️ FluentValidation.Tests.AssemblyScannerTester -``` -✔️ Finds_validators_for_types -✔️ ForEach_iterates_over_types -``` -### ✔️ FluentValidation.Tests.CascadingFailuresTester -``` -✔️ Cascade_mode_can_be_set_after_validator_instantiated -✔️ Cascade_mode_can_be_set_after_validator_instantiated_async -✔️ Cascade_mode_can_be_set_after_validator_instantiated_async_legacy -✔️ Cascade_mode_can_be_set_after_validator_instantiated_legacy -✔️ Validation_continues_on_failure -✔️ Validation_continues_on_failure_async -✔️ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level -✔️ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_async -✔️ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_async_legacy -✔️ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_legacy -✔️ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level -✔️ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_async -✔️ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_async_legacy -✔️ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_legacy -✔️ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop -✔️ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_async -✔️ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_async_legacy -✔️ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_legacy -✔️ Validation_continues_when_set_to_Continue_at_validator_level -✔️ Validation_continues_when_set_to_Continue_at_validator_level_async -✔️ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level -✔️ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_async -✔️ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_async_legacy -✔️ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_legacy -✔️ Validation_stops_on_first_failure -✔️ Validation_stops_on_first_failure_async -✔️ Validation_stops_on_first_failure_async_legacy -✔️ Validation_stops_on_first_failure_legacy -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_and_async_validator_is_invoked_synchronously -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_and_async_validator_is_invoked_synchronously_legacy -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_async -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_async_legacy -✔️ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_legacy -✔️ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level -✔️ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_async -✔️ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_async_legacy -✔️ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_legacy -``` -### ✔️ FluentValidation.Tests.ChainedValidationTester -``` -✔️ Can_validate_using_validator_for_base_type -✔️ Chained_property_should_be_excluded -✔️ Chained_validator_descriptor -✔️ Chained_validator_should_not_be_invoked_on_null_property -✔️ Condition_should_work_with_chained_property -✔️ Explicitly_included_properties_should_be_propagated_to_nested_validators -✔️ Explicitly_included_properties_should_be_propagated_to_nested_validators_using_strings -✔️ Separate_validation_on_chained_property -✔️ Separate_validation_on_chained_property_conditional -✔️ Separate_validation_on_chained_property_valid -✔️ Should_allow_normal_rules_and_chained_property_on_same_property -✔️ Uses_explicit_ruleset -✔️ Validates_chained_property -``` -### ✔️ FluentValidation.Tests.ChainingValidatorsTester -``` -✔️ Options_should_only_apply_to_current_validator -✔️ Should_create_multiple_validators -✔️ Should_execute_multiple_validators -``` -### ✔️ FluentValidation.Tests.ChildRulesTests -``` -✔️ Can_define_nested_rules_for_collection -✔️ ChildRules_works_with_RuleSet -``` -### ✔️ FluentValidation.Tests.CollectionValidatorWithParentTests -``` -✔️ Async_condition_should_work_with_child_collection -✔️ Can_specify_condition_for_individual_collection_elements -✔️ Can_validate_collection_using_validator_for_base_type -✔️ Collection_should_be_excluded -✔️ Collection_should_be_explicitly_included_with_expression -✔️ Collection_should_be_explicitly_included_with_string -✔️ Condition_should_work_with_child_collection -✔️ Creates_validator_using_context_from_property_value -✔️ Should_override_property_name -✔️ Should_work_with_top_level_collection_validator -✔️ Should_work_with_top_level_collection_validator_and_overriden_name -✔️ Skips_null_items -✔️ Validates_collection -✔️ Validates_collection_asynchronously -✔️ Validates_collection_several_levels_deep -✔️ Validates_collection_several_levels_deep_async -``` -### ✔️ FluentValidation.Tests.ComplexValidationTester -``` -✔️ Async_condition_should_work_with_complex_property -✔️ Async_condition_should_work_with_complex_property_when_validator_invoked_synchronously -✔️ Can_directly_validate_multiple_fields_of_same_type -✔️ Can_validate_using_validator_for_base_type -✔️ Complex_property_should_be_excluded -✔️ Complex_validator_should_not_be_invoked_on_null_property -✔️ Condition_should_work_with_complex_property -✔️ Condition_should_work_with_complex_property_when_invoked_async -✔️ Explicitly_included_properties_should_be_propagated_to_nested_validators -✔️ Explicitly_included_properties_should_be_propagated_to_nested_validators_using_strings -✔️ Multiple_rules_in_chain_with_childvalidator_shouldnt_reuse_accessor -✔️ Multiple_rules_in_chain_with_childvalidator_shouldnt_reuse_accessor_async -✔️ Should_allow_normal_rules_and_complex_property_on_same_property -✔️ Should_override_propertyName -✔️ Validates_child_validator_asynchronously -✔️ Validates_child_validator_synchronously -✔️ Validates_complex_property -``` -### ✔️ FluentValidation.Tests.ConditionTests -``` -✔️ Async_condition_executed_synchronosuly_with_asynchronous_collection_rule -✔️ Async_condition_executed_synchronosuly_with_asynchronous_rule -✔️ Async_condition_executed_synchronosuly_with_synchronous_collection_role -✔️ Async_condition_executed_synchronosuly_with_synchronous_role -✔️ Async_condition_is_applied_to_all_validators_in_the_chain -✔️ Async_condition_is_applied_to_all_validators_in_the_chain_when_executed_synchronously -✔️ Async_condition_is_applied_to_single_validator_in_the_chain_when_ApplyConditionTo_set_to_CurrentValidator -✔️ Condition_is_applied_to_all_validators_in_the_chain -✔️ Condition_is_applied_to_single_validator_in_the_chain_when_ApplyConditionTo_set_to_CurrentValidator -✔️ Sync_condition_is_applied_to_async_validators -✔️ Validation_should_fail_when_async_condition_does_not_match -✔️ Validation_should_fail_when_async_condition_matches -✔️ Validation_should_fail_when_condition_does_not_match -✔️ Validation_should_fail_when_condition_matches -✔️ Validation_should_succeed_when_async_condition_does_not_match -✔️ Validation_should_succeed_when_async_condition_matches -✔️ Validation_should_succeed_when_condition_does_not_match -✔️ Validation_should_succeed_when_condition_matches -``` -### ✔️ FluentValidation.Tests.CreditCardValidatorTests -``` -✔️ IsValidTests -✔️ When_validation_fails_the_default_error_should_be_set -``` -### ✔️ FluentValidation.Tests.CustomFailureActionTester -``` -✔️ Does_not_invoke_action_if_validation_success -✔️ Invokes_custom_action_on_failure -✔️ Passes_object_being_validated_to_action -``` -### ✔️ FluentValidation.Tests.CustomMessageFormatTester -``` -✔️ Replaces_propertyvalue_placeholder -✔️ Replaces_propertyvalue_with_empty_string_when_null -✔️ Should_format_custom_message -✔️ Uses_custom_delegate_for_building_message -✔️ Uses_custom_delegate_for_building_message_only_for_specific_validator -✔️ Uses_property_value_in_message -``` -### ✔️ FluentValidation.Tests.CustomValidatorTester -``` -✔️ New_Custom_Returns_single_failure -✔️ New_Custom_Returns_single_failure_async -✔️ New_custom_uses_empty_property_name_for_model_level_rule -✔️ New_Custom_When_property_name_omitted_infers_property_name -✔️ New_Custom_When_property_name_omitted_infers_property_name_nested -✔️ New_Custom_within_ruleset -✔️ New_CustomAsync_within_ruleset -✔️ Perserves_property_chain_using_custom -✔️ Runs_async_rule_synchronously_when_validator_invoked_synchronously -✔️ Runs_sync_rule_asynchronously_when_validator_invoked_asynchronously -``` -### ✔️ FluentValidation.Tests.DefaultValidatorExtensionTester -``` -✔️ Empty_should_create_EmptyValidator -✔️ Equal_should_create_EqualValidator_with_explicit_value -✔️ Equal_should_create_EqualValidator_with_lambda -✔️ GreaterThan_should_create_GreaterThanValidator_with_explicit_value -✔️ GreaterThan_should_create_GreaterThanValidator_with_lambda -✔️ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_explicit_value -✔️ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_lambda -✔️ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_lambda_with_other_Nullable -✔️ Length_should_create_ExactLengthValidator -✔️ Length_should_create_LengthValidator -✔️ Length_should_create_MaximumLengthValidator -✔️ Length_should_create_MinimumLengthValidator -✔️ LessThan_should_create_LessThanValidator_with_explicit_value -✔️ LessThan_should_create_LessThanValidator_with_lambda -✔️ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_explicit_value -✔️ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_lambda -✔️ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_lambda_with_other_Nullable -✔️ Must_should_create_PredicateValidator_with_context -✔️ Must_should_create_PredicateValidator_with_PropertyValidatorContext -✔️ Must_should_create_PredicteValidator -✔️ MustAsync_should_create_AsyncPredicateValidator_with_context -✔️ MustAsync_should_create_AsyncPredicateValidator_with_PropertyValidatorContext -✔️ MustAsync_should_create_AsyncPredicteValidator -✔️ MustAsync_should_not_throw_InvalidCastException -✔️ NotEmpty_should_create_NotEmptyValidator -✔️ NotEqual_should_create_NotEqualValidator_with_explicit_value -✔️ NotEqual_should_create_NotEqualValidator_with_lambda -✔️ NotNull_should_create_NotNullValidator -✔️ ScalePrecision_should_create_ScalePrecisionValidator -✔️ ScalePrecision_should_create_ScalePrecisionValidator_with_ignore_trailing_zeros -``` -### ✔️ FluentValidation.Tests.EmailValidatorTests -``` -✔️ Fails_email_validation_aspnetcore_compatible(email: " \r \t \n") -✔️ Fails_email_validation_aspnetcore_compatible(email: "") -✔️ Fails_email_validation_aspnetcore_compatible(email: "@someDomain.com") -✔️ Fails_email_validation_aspnetcore_compatible(email: "@someDomain@abc.com") -✔️ Fails_email_validation_aspnetcore_compatible(email: "0") -✔️ Fails_email_validation_aspnetcore_compatible(email: "someName") -✔️ Fails_email_validation_aspnetcore_compatible(email: "someName@") -✔️ Fails_email_validation_aspnetcore_compatible(email: "someName@a@b.com") -✔️ Invalid_email_addressex_regex(email: "") -✔️ Invalid_email_addressex_regex(email: "first.last@test..co.uk") -✔️ Invalid_email_addressex_regex(email: "testperso") -✔️ Invalid_email_addressex_regex(email: "thisisaverylongstringcodeplex.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: " @someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "!#$%&'*+-/=?^_`|~@someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "\"firstName.lastName\"@someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "1234@someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "firstName.lastName@someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@1234.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@some_domain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@some~domain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain￯.com") -✔️ Valid_email_addresses_aspnetcore_compatible(email: null) -✔️ Valid_email_addresses_regex(email: "__somename@example.com") -✔️ Valid_email_addresses_regex(email: "!def!xyz%abc@example.com") -✔️ Valid_email_addresses_regex(email: "\"Abc@def\"@example.com") -✔️ Valid_email_addresses_regex(email: "\"Abc\\@def\"@example.com") -✔️ Valid_email_addresses_regex(email: "\"Fred Bloggs\"@example.com") -✔️ Valid_email_addresses_regex(email: "\"Joe\\Blow\"@example.com") -✔️ Valid_email_addresses_regex(email: "$A12345@example.com") -✔️ Valid_email_addresses_regex(email: "customer/department=shipping@example.com") -✔️ Valid_email_addresses_regex(email: "first.last@test.co.uk") -✔️ Valid_email_addresses_regex(email: "testperson@gmail.com") -✔️ Valid_email_addresses_regex(email: "TestPerson@gmail.com") -✔️ Valid_email_addresses_regex(email: "testperson+label@gmail.com") -✔️ Valid_email_addresses_regex(email: null) -``` -### ✔️ FluentValidation.Tests.EmptyTester -``` -✔️ Passes_for_ienumerable_that_doesnt_implement_ICollection -✔️ Passes_when_collection_empty -✔️ When_there_is_a_value_then_the_validator_should_fail -✔️ When_validation_fails_error_should_be_set -✔️ When_value_is_Default_for_type_validator_should_pass_datetime -✔️ When_value_is_Default_for_type_validator_should_pass_int -✔️ When_value_is_empty_string_validator_should_pass -✔️ When_value_is_null_validator_should_pass -✔️ When_value_is_whitespace_validation_should_pass -``` -### ✔️ FluentValidation.Tests.EnumValidatorTests -``` -✔️ Flags_enum_invalid_when_using_outofrange_negative_value -✔️ Flags_enum_invalid_when_using_outofrange_positive_value -✔️ Flags_enum_valid_when_using_bitwise_value -✔️ Flags_enum_validates_correctly_when_using_zero_value -✔️ Flags_enum_with_overlapping_flags_valid_when_using_bitwise_value -✔️ IsValidTests -✔️ Nullable_enum_invalid_when_bad_value_specified -✔️ Nullable_enum_valid_when_property_value_is_null -✔️ Nullable_enum_valid_when_value_specified -✔️ When_the_enum_is_initialized_with_invalid_value_then_the_validator_should_fail -✔️ When_the_enum_is_not_initialized_with_valid_value_then_the_validator_should_fail -✔️ When_validation_fails_the_default_error_should_be_set -``` -### ✔️ FluentValidation.Tests.EqualValidatorTests -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Should_store_comparison_type -✔️ Should_store_property_to_compare -✔️ Should_succeed_on_case_insensitive_comparison -✔️ Should_succeed_on_case_insensitive_comparison_using_expression -✔️ Should_use_ordinal_comparison_by_default -✔️ Validates_against_property -✔️ When_the_objects_are_equal_validation_should_succeed -✔️ When_the_objects_are_not_equal_validation_should_fail -✔️ When_validation_fails_the_error_should_be_set -``` -### ✔️ FluentValidation.Tests.ExactLengthValidatorTester -``` -✔️ Min_and_max_properties_should_be_set -✔️ When_exact_length_rule_failes_error_should_have_exact_length_error_errorcode -✔️ When_the_text_is_an_exact_length_the_validator_should_pass -✔️ When_the_text_length_is_larger_the_validator_should_fail -✔️ When_the_text_length_is_smaller_the_validator_should_fail -✔️ When_the_validator_fails_the_error_message_should_be_set -``` -### ✔️ FluentValidation.Tests.ExclusiveBetweenValidatorTests -``` -✔️ To_and_from_properties_should_be_set -✔️ To_and_from_properties_should_be_set_for_dates -✔️ To_and_from_properties_should_be_set_for_strings -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_not_null -✔️ When_the_text_is_larger_than_the_range_then_the_validator_should_fail -✔️ When_the_text_is_larger_than_the_range_then_the_validator_should_fail_for_strings -✔️ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw -✔️ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw_for_strings -✔️ When_the_validator_fails_the_error_message_should_be_set -✔️ When_the_validator_fails_the_error_message_should_be_set_for_strings -✔️ When_the_value_is_between_the_range_specified_then_the_validator_should_pass -✔️ When_the_value_is_between_the_range_specified_then_the_validator_should_pass_for_strings -✔️ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_fail -✔️ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_fail_for_strings -✔️ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_fail -✔️ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_fail_for_strings -✔️ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail -✔️ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail_for_strings -``` -### ✔️ FluentValidation.Tests.ExtensionTester -``` -✔️ Should_extract_member_from_member_expression -✔️ Should_return_null_for_non_member_expressions -✔️ Should_split_pascal_cased_member_name -✔️ SplitPascalCase_should_return_null_when_input_is_null -``` -### ✔️ FluentValidation.Tests.ForEachRuleTests -``` -✔️ Async_condition_should_work_with_child_collection -✔️ Can_access_colletion_index -✔️ Can_access_colletion_index_async -✔️ Can_access_parent_index -✔️ Can_access_parent_index_async -✔️ Can_specify_condition_for_individual_collection_elements -✔️ Can_use_cascade_with_RuleForEach -✔️ Can_validate_collection_using_validator_for_base_type -✔️ Collection_should_be_excluded -✔️ Collection_should_be_explicitly_included_with_expression -✔️ Collection_should_be_explicitly_included_with_string -✔️ Condition_should_work_with_child_collection -✔️ Correctly_gets_collection_indices -✔️ Correctly_gets_collection_indices_async -✔️ Executes_rule_for_each_item_in_collection -✔️ Executes_rule_for_each_item_in_collection_async -✔️ Nested_collection_for_null_property_should_not_throw_null_reference -✔️ Nested_conditions_Rule_For -✔️ Nested_conditions_Rule_For_Each -✔️ Overrides_indexer -✔️ Overrides_indexer_async -✔️ Regular_rules_can_drop_into_RuleForEach -✔️ RuleForEach_async_RunsTasksSynchronously -✔️ Should_not_scramble_property_name_when_using_collection_validators_several_levels_deep -✔️ Should_not_scramble_property_name_when_using_collection_validators_several_levels_deep_with_ValidateAsync -✔️ Should_override_property_name -✔️ Skips_null_items -✔️ Top_level_collection -✔️ Uses_useful_error_message_when_used_on_non_property -✔️ Validates_child_validator_asynchronously -✔️ Validates_child_validator_synchronously -✔️ Validates_collection -✔️ When_runs_outside_RuleForEach_loop -✔️ When_runs_outside_RuleForEach_loop_async -``` -### ✔️ FluentValidation.Tests.GreaterThanOrEqualToValidatorTester -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Comparison_type -✔️ Should_fail_when_less_than_input -✔️ Should_localize_value -✔️ Should_set_default_error_when_validation_fails -✔️ Should_succeed_when_equal_to_input -✔️ Should_succeed_when_greater_than_input -✔️ Validates_nullable_with_nullable_property -✔️ Validates_with_nullable_property -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_is_null_cross_property -✔️ Validates_with_nullable_when_property_not_null -✔️ Validates_with_nullable_when_property_not_null_cross_property -✔️ Validates_with_property -``` -### ✔️ FluentValidation.Tests.GreaterThanValidatorTester -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Comparison_Type -✔️ Should_fail_when_equal_to_input -✔️ Should_fail_when_less_than_input -✔️ Should_set_default_error_when_validation_fails -✔️ Should_succeed_when_greater_than_input -✔️ Validates_nullable_with_nullable_property -✔️ Validates_with_nullable_property -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_is_null_cross_property -✔️ Validates_with_nullable_when_property_not_null -✔️ Validates_with_nullable_when_property_not_null_cross_property -✔️ Validates_with_property -``` -### ✔️ FluentValidation.Tests.InclusiveBetweenValidatorTests -``` -✔️ To_and_from_properties_should_be_set -✔️ To_and_from_properties_should_be_set_for_strings -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_not_null -✔️ When_the_text_is_larger_than_the_range_then_the_validator_should_fail -✔️ When_the_text_is_larger_than_the_range_then_the_validator_should_fail_for_strings -✔️ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw -✔️ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw_for_strings -✔️ When_the_validator_fails_the_error_message_should_be_set -✔️ When_the_validator_fails_the_error_message_should_be_set_for_strings -✔️ When_the_value_is_between_the_range_specified_then_the_validator_should_pass -✔️ When_the_value_is_between_the_range_specified_then_the_validator_should_pass_for_strings -✔️ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass -✔️ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass_for_strings -✔️ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass -✔️ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass_for_strings -✔️ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail -✔️ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail_for_strings -``` -### ✔️ FluentValidation.Tests.InheritanceValidatorTest -``` -✔️ Can_use_custom_subclass_with_nongeneric_overload -✔️ Validates_collection -✔️ Validates_collection_async -✔️ Validates_inheritance_async -✔️ Validates_inheritance_hierarchy -✔️ Validates_ruleset -✔️ Validates_ruleset_async -✔️ Validates_with_callback -✔️ Validates_with_callback_accepting_derived -✔️ Validates_with_callback_accepting_derived_async -✔️ Validates_with_callback_async -``` -### ✔️ FluentValidation.Tests.InlineValidatorTester -``` -✔️ Uses_inline_validator_to_build_rules -``` -### ✔️ FluentValidation.Tests.LanguageManagerTests -``` -✔️ All_languages_should_be_loaded -✔️ All_localizations_have_same_parameters_as_English -✔️ Always_use_specific_language -✔️ Always_use_specific_language_with_string_source -✔️ Can_replace_message -✔️ Can_replace_message_without_overriding_all_languages -✔️ Disables_localization -✔️ Falls_back_to_default_localization_key_when_error_code_key_not_found -✔️ Falls_back_to_english_when_culture_not_registered -✔️ Falls_back_to_english_when_translation_missing -✔️ Falls_back_to_parent_culture -✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn-BA") -✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn") -✔️ Gets_translation_for_bosnian_latin_culture(cultureName: "bs") -✔️ Gets_translation_for_croatian_culture -✔️ Gets_translation_for_culture -✔️ Gets_translation_for_serbian_culture(cultureName: "sr-Latn-RS") -✔️ Gets_translation_for_serbian_culture(cultureName: "sr-Latn") -✔️ Gets_translation_for_serbian_culture(cultureName: "sr") -✔️ Gets_translation_for_specific_culture -✔️ Uses_error_code_as_localization_key -``` -### ✔️ FluentValidation.Tests.LengthValidatorTests -``` -✔️ Min_and_max_properties_should_be_set -✔️ When_input_is_null_then_the_validator_should_pass -✔️ When_the_max_is_smaller_than_the_min_then_the_validator_should_throw -✔️ When_the_maxlength_validator_fails_the_error_message_should_be_set -✔️ When_the_minlength_validator_fails_the_error_message_should_be_set -✔️ When_the_text_is_between_the_lambda_range_specified_then_the_validator_should_pass -✔️ When_the_text_is_between_the_range_specified_then_the_validator_should_pass -✔️ When_the_text_is_exactly_the_size_of_the_lambda_lower_bound_then_the_validator_should_pass -✔️ When_the_text_is_exactly_the_size_of_the_lambda_upper_bound_then_the_validator_should_pass -✔️ When_the_text_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass -✔️ When_the_text_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass -✔️ When_the_text_is_larger_than_the_lambda_range_then_the_validator_should_fail -✔️ When_the_text_is_larger_than_the_range_then_the_validator_should_fail -✔️ When_the_text_is_smaller_than_the_lambda_range_then_the_validator_should_fail -✔️ When_the_text_is_smaller_than_the_range_then_the_validator_should_fail -✔️ When_the_validator_fails_the_error_message_should_be_set -``` -### ✔️ FluentValidation.Tests.LessThanOrEqualToValidatorTester -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Comparison_type -✔️ Should_fail_when_greater_than_input -✔️ Should_set_default_error_when_validation_fails -✔️ Should_succeed_when_equal_to_input -✔️ Should_succeed_when_less_than_input -✔️ Validates_nullable_with_nullable_property -✔️ Validates_with_nullable_property -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_is_null_cross_property -✔️ Validates_with_nullable_when_property_not_null -✔️ Validates_with_nullable_when_property_not_null_cross_property -✔️ Validates_with_property -``` -### ✔️ FluentValidation.Tests.LessThanValidatorTester -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Comparison_type -✔️ Extracts_property_from_constant_using_expression -✔️ Extracts_property_from_expression -✔️ Should_fail_when_equal_to_input -✔️ Should_fail_when_greater_than_input -✔️ Should_set_default_validation_message_when_validation_fails -✔️ Should_succeed_when_less_than_input -✔️ Should_throw_when_value_to_compare_is_null -✔️ Validates_against_property -✔️ Validates_nullable_with_nullable_property -✔️ Validates_with_nullable_property -✔️ Validates_with_nullable_when_property_is_null -✔️ Validates_with_nullable_when_property_not_null -✔️ Validates_with_nullable_when_property_not_null_cross_property -✔️ Validates_with_nullable_when_property_null_cross_property -``` -### ✔️ FluentValidation.Tests.LocalisedMessagesTester -``` -✔️ Correctly_assigns_default_localized_error_message -✔️ Does_not_throw_InvalidCastException_when_using_RuleForEach -✔️ Formats_string_with_placeholders -✔️ Formats_string_with_placeholders_when_you_cant_edit_the_string -✔️ Uses_func_to_get_message -✔️ Uses_string_format_with_property_value -``` -### ✔️ FluentValidation.Tests.LocalisedNameTester -``` -✔️ Uses_localized_name -✔️ Uses_localized_name_expression -``` -### ✔️ FluentValidation.Tests.MemberAccessorTests -``` -✔️ ComplexPropertyGet -✔️ ComplexPropertySet -✔️ Equality -✔️ ImplicitCast -✔️ Name -✔️ SimpleFieldGet -✔️ SimpleFieldSet -✔️ SimplePropertyGet -✔️ SimplePropertySet -``` -### ✔️ FluentValidation.Tests.MessageFormatterTests -``` -✔️ Adds_argument_and_custom_arguments -✔️ Adds_formatted_argument_and_custom_arguments -✔️ Adds_formatted_argument_and_formatted_custom_arguments -✔️ Adds_PropertyName_to_message -✔️ Adds_value_to_message -✔️ Format_property_value -✔️ Should_ignore_unknown_numbered_parameters -✔️ Should_ignore_unknown_parameters -✔️ Understands_date_formats -✔️ Understands_numeric_formats -``` -### ✔️ FluentValidation.Tests.ModelLevelValidatorTests -``` -✔️ Can_use_child_validator_at_model_level -✔️ Validates_at_model_level -``` -### ✔️ FluentValidation.Tests.NameResolutionPluggabilityTester -``` -✔️ Resolves_nested_properties -✔️ ShouldHaveValidationError_Should_support_custom_propertynameresolver -✔️ Uses_custom_property_name -``` -### ✔️ FluentValidation.Tests.NotEmptyTester -``` -✔️ Fails_for_array -✔️ Fails_for_ienumerable_that_doesnt_implement_ICollection -✔️ Fails_when_collection_empty -✔️ When_there_is_a_value_then_the_validator_should_pass -✔️ When_validation_fails_error_should_be_set -✔️ When_value_is_Default_for_type_validator_should_fail_datetime -✔️ When_value_is_Default_for_type_validator_should_fail_int -✔️ When_value_is_empty_string_validator_should_fail -✔️ When_value_is_null_validator_should_fail -✔️ When_value_is_whitespace_validation_should_fail -``` -### ✔️ FluentValidation.Tests.NotEqualValidatorTests -``` -✔️ Comparison_property_uses_custom_resolver -✔️ Should_handle_custom_value_types_correctly -✔️ Should_not_be_valid_for_case_insensitve_comparison -✔️ Should_not_be_valid_for_case_insensitve_comparison_with_expression -✔️ Should_store_comparison_type -✔️ Should_store_property_to_compare -✔️ Should_use_ordinal_comparison_by_default -✔️ Validates_across_properties -✔️ When_the_objects_are_equal_then_the_validator_should_fail -✔️ When_the_objects_are_not_equal_then_the_validator_should_pass -✔️ When_the_validator_fails_the_error_message_should_be_set -``` -### ✔️ FluentValidation.Tests.NotNullTester -``` -✔️ Fails_when_nullable_value_type_is_null -✔️ Not_null_validator_should_not_crash_with_non_nullable_value_type -✔️ NotNullValidator_should_fail_if_value_is_null -✔️ NotNullValidator_should_pass_if_value_has_value -✔️ When_the_validator_fails_the_error_message_should_be_set -``` -### ✔️ FluentValidation.Tests.NullTester -``` -✔️ Not_null_validator_should_not_crash_with_non_nullable_value_type -✔️ NullValidator_should_fail_if_value_has_value -✔️ NullValidator_should_pass_if_value_is_null -✔️ Passes_when_nullable_value_type_is_null -✔️ When_the_validator_passes_the_error_message_should_be_set -``` -### ✔️ FluentValidation.Tests.OnFailureTests -``` -✔️ OnFailure_called_for_each_failed_rule -✔️ OnFailure_called_for_each_failed_rule_asyncAsync -✔️ Should_be_able_to_access_error_message_in_OnFailure -✔️ ShouldHaveChildValidator_should_be_true -✔️ ShouldHaveChildValidator_works_with_Include -✔️ WhenAsyncWithOnFailure_should_invoke_condition_on_async_inner_validator -✔️ WhenAsyncWithOnFailure_should_invoke_condition_on_inner_validator -✔️ WhenAsyncWithOnFailure_should_invoke_condition_on_inner_validator_invoked_synchronously -✔️ WhenWithOnFailure_should_invoke_condition_on_async_inner_validator -✔️ WhenWithOnFailure_should_invoke_condition_on_inner_validator -``` -### ✔️ FluentValidation.Tests.PredicateValidatorTester -``` -✔️ Should_fail_when_predicate_returns_false -✔️ Should_succeed_when_predicate_returns_true -✔️ Should_throw_when_predicate_is_null -✔️ When_validation_fails_metadata_should_be_set_on_failure -✔️ When_validation_fails_the_default_error_should_be_set -``` -### ✔️ FluentValidation.Tests.PropertyChainTests -``` -✔️ AddIndexer_throws_when_nothing_added -✔️ Calling_ToString_should_construct_string_representation_of_chain -✔️ Calling_ToString_should_construct_string_representation_of_chain_with_indexers -✔️ Creates_from_expression -✔️ Should_be_subchain -✔️ Should_ignore_blanks -✔️ Should_not_be_subchain -``` -### ✔️ FluentValidation.Tests.RegularExpressionValidatorTests -``` -✔️ Can_access_expression_in_message -✔️ Can_access_expression_in_message_lambda -✔️ Can_access_expression_in_message_lambda_regex -✔️ Uses_lazily_loaded_expression -✔️ Uses_lazily_loaded_expression_with_options -✔️ Uses_regex_object -✔️ When_the_text_does_not_match_the_lambda_regex_regular_expression_then_the_validator_should_fail -✔️ When_the_text_does_not_match_the_lambda_regular_expression_then_the_validator_should_fail -✔️ When_the_text_does_not_match_the_regular_expression_then_the_validator_should_fail -✔️ When_the_text_is_empty_then_the_validator_should_fail -✔️ When_the_text_is_null_then_the_validator_should_pass -✔️ When_the_text_matches_the_lambda_regex_regular_expression_then_the_validator_should_pass -✔️ When_the_text_matches_the_lambda_regular_expression_then_the_validator_should_pass -✔️ When_the_text_matches_the_regular_expression_then_the_validator_should_pass -✔️ When_validation_fails_the_default_error_should_be_set -``` -### ✔️ FluentValidation.Tests.RuleBuilderTests -``` -✔️ Adding_a_validator_should_return_builder -✔️ Adding_a_validator_should_store_validator -✔️ Calling_validate_should_delegate_to_underlying_validator -✔️ Calling_ValidateAsync_should_delegate_to_underlying_async_validator -✔️ Calling_ValidateAsync_should_delegate_to_underlying_sync_validator -✔️ Conditional_child_validator_should_register_with_validator_type_not_property -✔️ Nullable_object_with_async_condition_should_not_throw -✔️ Nullable_object_with_condition_should_not_throw -✔️ Property_should_return_null_when_it_is_not_a_property_being_validated -✔️ Property_should_return_property_being_validated -✔️ PropertyDescription_should_return_custom_property_name -✔️ PropertyDescription_should_return_property_name_split -✔️ Result_should_use_custom_property_name_when_no_property_name_can_be_determined -✔️ Rule_for_a_non_memberexpression_should_not_generate_property_name -✔️ Should_build_property_name -✔️ Should_compile_expression -✔️ Should_set_custom_error -✔️ Should_set_custom_property_name -✔️ Should_throw_if_message_is_null -✔️ Should_throw_if_overriding_validator_is_null -✔️ Should_throw_if_overriding_validator_provider_is_null -✔️ Should_throw_if_property_name_is_null -✔️ Should_throw_if_validator_is_null -✔️ Should_throw_when_async_inverse_predicate_is_null -✔️ Should_throw_when_async_predicate_is_null -✔️ Should_throw_when_context_predicate_is_null -✔️ Should_throw_when_inverse_context_predicate_is_null -✔️ Should_throw_when_inverse_predicate_is_null -✔️ Should_throw_when_predicate_is_null -``` -### ✔️ FluentValidation.Tests.RuleDependencyTests -``` -✔️ Async_inside_dependent_rules -✔️ Async_inside_dependent_rules_when_parent_rule_not_async -✔️ Dependent_rules_inside_ruleset -✔️ Dependent_rules_inside_when -✔️ Does_not_invoke_dependent_rule_if_parent_rule_does_not_pass -✔️ Invokes_dependent_rule_if_parent_rule_passes -✔️ Nested_dependent_rules -✔️ Nested_dependent_rules_inside_ruleset -✔️ Nested_dependent_rules_inside_ruleset_inside_method -✔️ Nested_dependent_rules_inside_ruleset_no_result_when_second_level_fails -✔️ Nested_dependent_rules_inside_ruleset_no_result_when_top_level_fails -✔️ TestAsyncWithDependentRules_AsyncEntry -✔️ TestAsyncWithDependentRules_SyncEntry -✔️ Treats_root_level_RuleFor_call_as_dependent_rule_if_user_forgets_to_use_DependentRulesBuilder -``` -### ✔️ FluentValidation.Tests.RulesetTests -``` -✔️ Applies_multiple_rulesets_to_rule -✔️ Combines_rulesets_and_explicit_properties -✔️ Combines_rulesets_and_explicit_properties_async -✔️ Executes_all_rules -✔️ Executes_in_rule_in_default_and_none -✔️ Executes_in_rule_in_ruleset_and_default -✔️ Executes_multiple_rulesets -✔️ Executes_rules_in_default_ruleset_and_specific_ruleset -✔️ Executes_rules_in_specified_ruleset -✔️ Executes_rules_not_specified_in_ruleset -✔️ Includes_all_rulesets -✔️ Includes_all_rulesets_async -✔️ Includes_combination_of_rulesets -✔️ Includes_combination_of_rulesets_async -✔️ Ruleset_cascades_to_child_collection_validator -✔️ Ruleset_cascades_to_child_validator -✔️ Ruleset_selection_should_cascade_downwards_with_when_setting_child_validator_using_include_statement -✔️ Ruleset_selection_should_cascade_downwards_with_when_setting_child_validator_using_include_statement_with_lambda -✔️ Ruleset_selection_should_not_cascade_downwards_when_set_on_property -✔️ Trims_spaces -✔️ WithMessage_works_inside_rulesets -``` -### ✔️ FluentValidation.Tests.ScalePrecisionValidatorTests -``` -✔️ Scale_precision_should_be_valid -✔️ Scale_precision_should_be_valid_when_ignoring_trailing_zeroes -✔️ Scale_precision_should_be_valid_when_they_are_equal -✔️ Scale_precision_should_not_be_valid -✔️ Scale_precision_should_not_be_valid_when_ignoring_trailing_zeroes -✔️ Scale_precision_should_not_be_valid_when_they_are_equal -``` -### ✔️ FluentValidation.Tests.SharedConditionTests -``` -✔️ Async_condition_can_be_used_inside_ruleset -✔️ Condition_can_be_used_inside_ruleset -✔️ Does_not_execute_custom_Rule_when_async_condition_false -✔️ Does_not_execute_custom_Rule_when_condition_false -✔️ Does_not_execute_customasync_Rule_when_async_condition_false -✔️ Does_not_execute_customasync_Rule_when_condition_false -✔️ Doesnt_throw_NullReferenceException_when_instance_not_null -✔️ Doesnt_throw_NullReferenceException_when_instance_not_null_async -✔️ Executes_custom_rule_when_async_condition_true -✔️ Executes_custom_rule_when_condition_true -✔️ Executes_customasync_rule_when_async_condition_true -✔️ Executes_customasync_rule_when_condition_true -✔️ Nested_async_conditions_with_Custom_rule -✔️ Nested_async_conditions_with_CustomAsync_rule -✔️ Nested_conditions_with_Custom_rule -✔️ Nested_conditions_with_CustomAsync_rule -✔️ Outer_async_Unless_clause_will_trump_an_inner_Unless_clause_when_inner_fails_but_the_outer_is_satisfied -✔️ Outer_Unless_clause_will_trump_an_inner_Unless_clause_when_inner_fails_but_the_outer_is_satisfied -✔️ Rules_invoke_when_inverse_shared_async_condition_matches -✔️ Rules_invoke_when_inverse_shared_condition_matches -✔️ Rules_not_invoked_when_inverse_shared_async_condition_does_not_match -✔️ Rules_not_invoked_when_inverse_shared_condition_does_not_match -✔️ RuleSet_can_be_used_inside_async_condition -✔️ RuleSet_can_be_used_inside_condition -✔️ Runs_otherwise_conditions_for_UnlessAsync -✔️ Runs_otherwise_conditions_for_When -✔️ Runs_otherwise_conditions_for_WhenAsync -✔️ Runs_otherwise_conditons_for_Unless -✔️ Shared_async_When_is_applied_to_groupd_rules_when_initial_predicate_is_true_and_all_individual_rules_are_satisfied -✔️ Shared_async_When_is_applied_to_grouped_rules_when_initial_predicate_is_true -✔️ Shared_async_When_is_not_applied_to_grouped_rules_when_initial_predicate_is_false -✔️ Shared_async_When_respects_the_smaller_scope_of_a_inner_Unless_when_the_inner_Unless_predicate_fails -✔️ Shared_async_When_respects_the_smaller_scope_of_an_inner_Unless_when_the_inner_Unless_predicate_is_satisfied -✔️ Shared_When_is_applied_to_groupd_rules_when_initial_predicate_is_true_and_all_individual_rules_are_satisfied -✔️ Shared_When_is_applied_to_grouped_rules_when_initial_predicate_is_true -✔️ Shared_When_is_not_applied_to_grouped_rules_when_initial_predicate_is_false -✔️ Shared_When_respects_the_smaller_scope_of_a_inner_Unless_when_the_inner_Unless_predicate_fails -✔️ Shared_When_respects_the_smaller_scope_of_an_inner_Unless_when_the_inner_Unless_predicate_is_satisfied -✔️ When_async_condition_executed_for_each_instance_of_RuleForEach_condition_should_not_be_cached -✔️ When_condition_executed_for_each_instance_of_RuleForEach_condition_should_not_be_cached -✔️ When_condition_only_executed_once -✔️ WhenAsync_condition_only_executed_once -``` -### ✔️ FluentValidation.Tests.StandalonePropertyValidationTester -``` -✔️ Should_validate_property_value_without_instance -``` -### ✔️ FluentValidation.Tests.StringEnumValidatorTests -``` -✔️ IsValidTests_CaseInsensitive_CaseCorrect -✔️ IsValidTests_CaseInsensitive_CaseIncorrect -✔️ IsValidTests_CaseSensitive_CaseCorrect -✔️ IsValidTests_CaseSensitive_CaseIncorrect -✔️ When_enumType_is_not_an_enum_it_should_throw -✔️ When_enumType_is_null_it_should_throw -✔️ When_the_property_is_initialized_with_empty_string_then_the_validator_should_fail -✔️ When_the_property_is_initialized_with_invalid_string_then_the_validator_should_fail -✔️ When_the_property_is_initialized_with_null_then_the_validator_should_be_valid -✔️ When_validation_fails_the_default_error_should_be_set -``` -### ✔️ FluentValidation.Tests.TrackingCollectionTests -``` -✔️ Add_AddsItem -✔️ Should_not_raise_event_once_handler_detached -✔️ When_Item_Added_Raises_ItemAdded -``` -### ✔️ FluentValidation.Tests.TransformTests -``` -✔️ Transforms_collection_element -✔️ Transforms_collection_element_async -✔️ Transforms_property_value -✔️ Transforms_property_value_to_another_type -``` -### ✔️ FluentValidation.Tests.UserSeverityTester -``` -✔️ Can_Provide_conditional_severity -✔️ Can_Provide_severity_for_item_in_collection -✔️ Correctly_provides_object_being_validated -✔️ Defaults_user_severity_to_error -✔️ Should_use_last_supplied_severity -✔️ Stores_user_severity_against_validation_failure -✔️ Throws_when_provider_is_null -``` -### ✔️ FluentValidation.Tests.UserStateTester -``` -✔️ Can_Provide_state_for_item_in_collection -✔️ Correctly_provides_object_being_validated -✔️ Stores_user_state_against_validation_failure -✔️ Throws_when_provider_is_null -``` -### ✔️ FluentValidation.Tests.ValidateAndThrowTester -``` -✔️ Does_not_throw_when_valid -✔️ Does_not_throw_when_valid_and_a_ruleset -✔️ Does_not_throw_when_valid_and_a_ruleset_async -✔️ Does_not_throw_when_valid_async -✔️ Only_root_validator_throws -✔️ Populates_errors -✔️ Serializes_exception -✔️ Throws_exception -✔️ Throws_exception_async -✔️ Throws_exception_with_a_ruleset -✔️ Throws_exception_with_a_ruleset_async -✔️ ToString_provides_error_details -✔️ ValidationException_provides_correct_message_when_appendDefaultMessage_false -✔️ ValidationException_provides_correct_message_when_appendDefaultMessage_true -``` -### ✔️ FluentValidation.Tests.ValidationResultTests -``` -✔️ Can_serialize_failure -✔️ Can_serialize_result -✔️ Should_add_errors -✔️ Should_be_valid_when_there_are_no_errors -✔️ Should_not_be_valid_when_there_are_errors -✔️ ToString_return_empty_string_when_there_is_no_error -✔️ ToString_return_error_messages_with_given_separator -✔️ ToString_return_error_messages_with_newline_as_separator -``` -### ✔️ FluentValidation.Tests.ValidatorDescriptorTester -``` -✔️ Does_not_throw_when_rule_declared_without_property -✔️ Gets_validators_for_property -✔️ GetValidatorsForMember_and_GetRulesForMember_can_both_retrieve_for_model_level_rule -✔️ Returns_empty_collection_for_property_with_no_validators -✔️ Should_retrieve_name_given_to_it_pass_property_as_string -``` -### ✔️ FluentValidation.Tests.ValidatorSelectorTests -``` -✔️ Can_use_property_with_include -✔️ Does_not_validate_other_property -✔️ Does_not_validate_other_property_using_expression -✔️ Executes_correct_rule_when_using_property_with_include -✔️ Executes_correct_rule_when_using_property_with_include_async -✔️ Includes_nested_property -✔️ Includes_nested_property_using_expression -✔️ MemberNameValidatorSelector_returns_true_when_property_name_matches -✔️ Validates_nullable_property_with_overriden_name_when_selected -✔️ Validates_property_using_expression -``` -### ✔️ FluentValidation.Tests.ValidatorTesterTester -``` -✔️ Allows_only_one_failure_to_match -✔️ Can_use_indexer_in_string_message -✔️ Can_use_indexer_in_string_message_inverse -✔️ Expected_error_code_check -✔️ Expected_message_argument_check -✔️ Expected_message_check -✔️ Expected_severity_check -✔️ Expected_state_check -✔️ Matches_any_failure -✔️ Matches_model_level_rule -✔️ Model_level_check_fails_if_no_model_level_failures -✔️ ShouldHaveChildValidator_should_not_throw_when_property_Does_have_child_validator -✔️ ShouldHaveChildValidator_should_not_throw_when_property_Does_have_child_validator_and_expecting_a_basetype -✔️ ShouldHaveChildValidator_should_not_throw_when_property_has_collection_validators -✔️ ShouldHaveChildValidator_should_throw_when_property_has_a_different_child_validator -✔️ ShouldHaveChildValidator_should_work_with_DependentRules -✔️ ShouldHaveChildvalidator_throws_when_collection_property_Does_not_have_child_validator -✔️ ShouldHaveChildValidator_throws_when_property_does_not_have_child_validator -✔️ ShouldHaveChildValidator_works_on_model_level_rules -✔️ ShouldHaveValidationError_async -✔️ ShouldHaveValidationError_async_throws -✔️ ShouldHaveValidationError_model_async -✔️ ShouldHaveValidationError_model_async_throws -✔️ ShouldHaveValidationError_preconstructed_object_does_not_throw_for_unwritable_property -✔️ ShouldHaveValidationError_should_not_throw_when_there_are_errors_with_preconstructed_object -✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors -✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "") -✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null) -✔️ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors_ruleforeach -✔️ ShouldHaveValidationError_Should_support_nested_properties -✔️ ShouldHaveValidationError_Should_throw_when_there_are_no_validation_errors -✔️ ShouldHaveValidationError_should_throw_when_there_are_no_validation_errors_with_preconstructed_object -✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "") -✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "cardNumber") -✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: null) -✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 42, cardNumber: "cardNumber") -✔️ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors_ruleforeach -✔️ ShouldHaveValidationError_with_an_unmatched_rule_and_a_single_error_should_throw_an_exception -✔️ ShouldHaveValidationError_with_an_unmatched_rule_and_multiple_errors_should_throw_an_exception -✔️ ShouldHaveValidationErrorFor_takes_account_of_rulesets -✔️ ShouldHaveValidationErrorFor_takes_account_of_rulesets_fluent_approach -✔️ ShouldNotHaveValidationError_async -✔️ ShouldNotHaveValidationError_async_model_throws -✔️ ShouldNotHaveValidationError_async_throws -✔️ ShouldNotHaveValidationError_model_async -✔️ ShouldNotHaveValidationError_should_correctly_handle_explicitly_providing_object_to_validate -✔️ ShouldNotHaveValidationError_should_correctly_handle_explicitly_providing_object_to_validate_and_other_property_fails_validation -✔️ ShouldNotHaveValidationError_should_have_validation_error_details_when_thrown_ruleforeach -✔️ ShouldNotHaveValidationError_should_not_throw_when_there_are_no_errors -✔️ ShouldNotHAveValidationError_should_not_throw_When_there_are_no_errors_with_preconstructed_object -✔️ ShouldNotHaveValidationError_should_not_throw_when_there_are_not_validation_errors_ruleforeach -✔️ ShouldNotHaveValidationError_Should_support_nested_properties -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_errors -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_errors_with_preconstructed_object -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "") -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "cardNumber") -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: null) -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "cardNumber") -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "") -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null) -✔️ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors_ruleforeach -✔️ Tests_nested_property -✔️ Tests_nested_property_reverse -✔️ Tests_nested_property_using_obsolete_method -✔️ TestValidate_runs_async -✔️ TestValidate_runs_async_throws -✔️ Unexpected_error_code_check -✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["bar"]) -✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo", "bar"]) -✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo"]) -✔️ Unexpected_message_check(withoutErrMsg: "bar", errMessages: []) -✔️ Unexpected_severity_check -✔️ Unexpected_state_check -``` \ No newline at end of file +|[FluentValidation.Tests.AbstractValidatorTester](#user-content-r0s0)|35 ✅|||12ms| +|[FluentValidation.Tests.AccessorCacheTests](#user-content-r0s1)|4 ✅||1 ⚪|4ms| +|[FluentValidation.Tests.AssemblyScannerTester](#user-content-r0s2)|2 ✅|||2ms| +|[FluentValidation.Tests.CascadingFailuresTester](#user-content-r0s3)|38 ✅|||23ms| +|[FluentValidation.Tests.ChainedValidationTester](#user-content-r0s4)|13 ✅|||6ms| +|[FluentValidation.Tests.ChainingValidatorsTester](#user-content-r0s5)|3 ✅|||1ms| +|[FluentValidation.Tests.ChildRulesTests](#user-content-r0s6)|2 ✅|||7ms| +|[FluentValidation.Tests.CollectionValidatorWithParentTests](#user-content-r0s7)|16 ✅|||13ms| +|[FluentValidation.Tests.ComplexValidationTester](#user-content-r0s8)|17 ✅|||26ms| +|[FluentValidation.Tests.ConditionTests](#user-content-r0s9)|18 ✅|||9ms| +|[FluentValidation.Tests.CreditCardValidatorTests](#user-content-r0s10)|2 ✅|||2ms| +|[FluentValidation.Tests.CustomFailureActionTester](#user-content-r0s11)|3 ✅|||1ms| +|[FluentValidation.Tests.CustomMessageFormatTester](#user-content-r0s12)|6 ✅|||3ms| +|[FluentValidation.Tests.CustomValidatorTester](#user-content-r0s13)|10 ✅|||6ms| +|[FluentValidation.Tests.DefaultValidatorExtensionTester](#user-content-r0s14)|30 ✅|||38ms| +|[FluentValidation.Tests.EmailValidatorTests](#user-content-r0s15)|36 ✅|||18ms| +|[FluentValidation.Tests.EmptyTester](#user-content-r0s16)|9 ✅|||5ms| +|[FluentValidation.Tests.EnumValidatorTests](#user-content-r0s17)|12 ✅|||24ms| +|[FluentValidation.Tests.EqualValidatorTests](#user-content-r0s18)|10 ✅|||3ms| +|[FluentValidation.Tests.ExactLengthValidatorTester](#user-content-r0s19)|6 ✅|||2ms| +|[FluentValidation.Tests.ExclusiveBetweenValidatorTests](#user-content-r0s20)|19 ✅|||6ms| +|[FluentValidation.Tests.ExtensionTester](#user-content-r0s21)|4 ✅|||1ms| +|[FluentValidation.Tests.ForEachRuleTests](#user-content-r0s22)|34 ✅|||47ms| +|[FluentValidation.Tests.GreaterThanOrEqualToValidatorTester](#user-content-r0s23)|14 ✅|||5ms| +|[FluentValidation.Tests.GreaterThanValidatorTester](#user-content-r0s24)|13 ✅|||4ms| +|[FluentValidation.Tests.InclusiveBetweenValidatorTests](#user-content-r0s25)|18 ✅|||4ms| +|[FluentValidation.Tests.InheritanceValidatorTest](#user-content-r0s26)|11 ✅|||18ms| +|[FluentValidation.Tests.InlineValidatorTester](#user-content-r0s27)|1 ✅|||2ms| +|[FluentValidation.Tests.LanguageManagerTests](#user-content-r0s28)|21 ✅|||28ms| +|[FluentValidation.Tests.LengthValidatorTests](#user-content-r0s29)|16 ✅|||17ms| +|[FluentValidation.Tests.LessThanOrEqualToValidatorTester](#user-content-r0s30)|13 ✅|||4ms| +|[FluentValidation.Tests.LessThanValidatorTester](#user-content-r0s31)|16 ✅|||6ms| +|[FluentValidation.Tests.LocalisedMessagesTester](#user-content-r0s32)|6 ✅|||3ms| +|[FluentValidation.Tests.LocalisedNameTester](#user-content-r0s33)|2 ✅|||1ms| +|[FluentValidation.Tests.MemberAccessorTests](#user-content-r0s34)|9 ✅|||5ms| +|[FluentValidation.Tests.MessageFormatterTests](#user-content-r0s35)|10 ✅|||2ms| +|[FluentValidation.Tests.ModelLevelValidatorTests](#user-content-r0s36)|2 ✅|||1ms| +|[FluentValidation.Tests.NameResolutionPluggabilityTester](#user-content-r0s37)|3 ✅|||2ms| +|[FluentValidation.Tests.NotEmptyTester](#user-content-r0s38)|10 ✅|||7ms| +|[FluentValidation.Tests.NotEqualValidatorTests](#user-content-r0s39)|11 ✅|||7ms| +|[FluentValidation.Tests.NotNullTester](#user-content-r0s40)|5 ✅|||1ms| +|[FluentValidation.Tests.NullTester](#user-content-r0s41)|5 ✅|||2ms| +|[FluentValidation.Tests.OnFailureTests](#user-content-r0s42)|10 ✅|||8ms| +|[FluentValidation.Tests.PredicateValidatorTester](#user-content-r0s43)|5 ✅|||2ms| +|[FluentValidation.Tests.PropertyChainTests](#user-content-r0s44)|7 ✅|||1ms| +|[FluentValidation.Tests.RegularExpressionValidatorTests](#user-content-r0s45)|15 ✅|||6ms| +|[FluentValidation.Tests.RuleBuilderTests](#user-content-r0s46)|29 ✅|||96ms| +|[FluentValidation.Tests.RuleDependencyTests](#user-content-r0s47)|14 ✅|||3s| +|[FluentValidation.Tests.RulesetTests](#user-content-r0s48)|21 ✅|||14ms| +|[FluentValidation.Tests.ScalePrecisionValidatorTests](#user-content-r0s49)|6 ✅|||4ms| +|[FluentValidation.Tests.SharedConditionTests](#user-content-r0s50)|42 ✅|||42ms| +|[FluentValidation.Tests.StandalonePropertyValidationTester](#user-content-r0s51)|1 ✅|||0ms| +|[FluentValidation.Tests.StringEnumValidatorTests](#user-content-r0s52)|10 ✅|||5ms| +|[FluentValidation.Tests.TrackingCollectionTests](#user-content-r0s53)|3 ✅|||2ms| +|[FluentValidation.Tests.TransformTests](#user-content-r0s54)|4 ✅|||3ms| +|[FluentValidation.Tests.UserSeverityTester](#user-content-r0s55)|7 ✅|||3ms| +|[FluentValidation.Tests.UserStateTester](#user-content-r0s56)|4 ✅|||3ms| +|[FluentValidation.Tests.ValidateAndThrowTester](#user-content-r0s57)|14 ✅|||25ms| +|[FluentValidation.Tests.ValidationResultTests](#user-content-r0s58)|8 ✅|||8ms| +|[FluentValidation.Tests.ValidatorDescriptorTester](#user-content-r0s59)|5 ✅|||1ms| +|[FluentValidation.Tests.ValidatorSelectorTests](#user-content-r0s60)|10 ✅|||9ms| +|[FluentValidation.Tests.ValidatorTesterTester](#user-content-r0s61)|73 ✅|||74ms| +### ✅ FluentValidation.Tests.AbstractValidatorTester +``` +✅ Can_replace_default_errorcode_resolver +✅ CanValidateInstancesOfType_returns_false_when_comparing_against_some_other_type +✅ CanValidateInstancesOfType_returns_true_when_comparing_against_same_type +✅ CanValidateInstancesOfType_returns_true_when_comparing_against_subclass +✅ Default_error_code_should_be_class_name +✅ OverridePropertyName_should_override_property_name +✅ OverridePropertyName_with_lambda_should_override_property_name +✅ PreValidate_bypasses_nullcheck_on_instance +✅ RuleForeach_with_null_instances +✅ Should_be_valid_when_there_are_no_failures_for_single_property +✅ Should_not_main_state +✅ Should_throw_for_non_member_expression_when_validating_single_property +✅ Should_throw_when_rule_is_null +✅ Should_validate_public_Field +✅ Should_validate_single_Field +✅ Should_validate_single_property +✅ Should_validate_single_property_where_invalid_property_as_string +✅ Should_validate_single_property_where_property_as_string +✅ Uses_named_parameters_to_validate_ruleset +✅ Validates_single_property_by_path +✅ Validates_type_when_using_non_generic_validate_overload +✅ When_the_validators_fail_then_the_errors_Should_be_accessible_via_the_errors_property +✅ When_the_validators_fail_then_validatorrunner_should_return_false +✅ When_the_Validators_pass_then_the_validatorRunner_should_return_true +✅ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: ) +✅ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_Validate(preValidationResult: AnotherInt Test Message) +✅ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: ) +✅ WhenPreValidationReturnsFalse_ResultReturnToUserImmediatly_ValidateAsync(preValidationResult: AnotherInt Test Message) +✅ WhenPreValidationReturnsTrue_ValidatorsGetHit_Validate +✅ WhenPreValidationReturnsTrue_ValidatorsGetHit_ValidateAsync +✅ WithErrorCode_should_override_error_code +✅ WithMessage_and_WithErrorCode_should_override_error_message_and_error_code +✅ WithMessage_should_override_error_message +✅ WithName_should_override_field_name +✅ WithName_should_override_field_name_with_value_from_other_property +``` +### ✅ FluentValidation.Tests.AccessorCacheTests +``` +⚪ Benchmark +✅ Equality_comparison_check +✅ Gets_accessor +✅ Gets_member_for_nested_property +✅ Identifies_if_memberexp_acts_on_model_instance +``` +### ✅ FluentValidation.Tests.AssemblyScannerTester +``` +✅ Finds_validators_for_types +✅ ForEach_iterates_over_types +``` +### ✅ FluentValidation.Tests.CascadingFailuresTester +``` +✅ Cascade_mode_can_be_set_after_validator_instantiated +✅ Cascade_mode_can_be_set_after_validator_instantiated_async +✅ Cascade_mode_can_be_set_after_validator_instantiated_async_legacy +✅ Cascade_mode_can_be_set_after_validator_instantiated_legacy +✅ Validation_continues_on_failure +✅ Validation_continues_on_failure_async +✅ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level +✅ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_async +✅ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_async_legacy +✅ Validation_continues_on_failure_when_set_to_Stop_globally_and_overriden_at_rule_level_legacy +✅ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level +✅ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_async +✅ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_async_legacy +✅ Validation_continues_on_failure_when_set_to_StopOnFirstFailure_at_validator_level_and_overriden_at_rule_level_legacy +✅ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop +✅ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_async +✅ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_async_legacy +✅ Validation_continues_to_second_validator_when_first_validator_succeeds_and_cascade_set_to_stop_legacy +✅ Validation_continues_when_set_to_Continue_at_validator_level +✅ Validation_continues_when_set_to_Continue_at_validator_level_async +✅ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level +✅ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_async +✅ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_async_legacy +✅ Validation_stops_on_failure_when_set_to_Continue_and_overriden_at_rule_level_legacy +✅ Validation_stops_on_first_failure +✅ Validation_stops_on_first_failure_async +✅ Validation_stops_on_first_failure_async_legacy +✅ Validation_stops_on_first_failure_legacy +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_and_async_validator_is_invoked_synchronously +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_and_async_validator_is_invoked_synchronously_legacy +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_async +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_async_legacy +✅ Validation_stops_on_first_Failure_when_set_to_Continue_globally_and_overriden_at_rule_level_legacy +✅ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level +✅ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_async +✅ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_async_legacy +✅ Validation_stops_on_first_failure_when_set_to_StopOnFirstFailure_at_validator_level_legacy +``` +### ✅ FluentValidation.Tests.ChainedValidationTester +``` +✅ Can_validate_using_validator_for_base_type +✅ Chained_property_should_be_excluded +✅ Chained_validator_descriptor +✅ Chained_validator_should_not_be_invoked_on_null_property +✅ Condition_should_work_with_chained_property +✅ Explicitly_included_properties_should_be_propagated_to_nested_validators +✅ Explicitly_included_properties_should_be_propagated_to_nested_validators_using_strings +✅ Separate_validation_on_chained_property +✅ Separate_validation_on_chained_property_conditional +✅ Separate_validation_on_chained_property_valid +✅ Should_allow_normal_rules_and_chained_property_on_same_property +✅ Uses_explicit_ruleset +✅ Validates_chained_property +``` +### ✅ FluentValidation.Tests.ChainingValidatorsTester +``` +✅ Options_should_only_apply_to_current_validator +✅ Should_create_multiple_validators +✅ Should_execute_multiple_validators +``` +### ✅ FluentValidation.Tests.ChildRulesTests +``` +✅ Can_define_nested_rules_for_collection +✅ ChildRules_works_with_RuleSet +``` +### ✅ FluentValidation.Tests.CollectionValidatorWithParentTests +``` +✅ Async_condition_should_work_with_child_collection +✅ Can_specify_condition_for_individual_collection_elements +✅ Can_validate_collection_using_validator_for_base_type +✅ Collection_should_be_excluded +✅ Collection_should_be_explicitly_included_with_expression +✅ Collection_should_be_explicitly_included_with_string +✅ Condition_should_work_with_child_collection +✅ Creates_validator_using_context_from_property_value +✅ Should_override_property_name +✅ Should_work_with_top_level_collection_validator +✅ Should_work_with_top_level_collection_validator_and_overriden_name +✅ Skips_null_items +✅ Validates_collection +✅ Validates_collection_asynchronously +✅ Validates_collection_several_levels_deep +✅ Validates_collection_several_levels_deep_async +``` +### ✅ FluentValidation.Tests.ComplexValidationTester +``` +✅ Async_condition_should_work_with_complex_property +✅ Async_condition_should_work_with_complex_property_when_validator_invoked_synchronously +✅ Can_directly_validate_multiple_fields_of_same_type +✅ Can_validate_using_validator_for_base_type +✅ Complex_property_should_be_excluded +✅ Complex_validator_should_not_be_invoked_on_null_property +✅ Condition_should_work_with_complex_property +✅ Condition_should_work_with_complex_property_when_invoked_async +✅ Explicitly_included_properties_should_be_propagated_to_nested_validators +✅ Explicitly_included_properties_should_be_propagated_to_nested_validators_using_strings +✅ Multiple_rules_in_chain_with_childvalidator_shouldnt_reuse_accessor +✅ Multiple_rules_in_chain_with_childvalidator_shouldnt_reuse_accessor_async +✅ Should_allow_normal_rules_and_complex_property_on_same_property +✅ Should_override_propertyName +✅ Validates_child_validator_asynchronously +✅ Validates_child_validator_synchronously +✅ Validates_complex_property +``` +### ✅ FluentValidation.Tests.ConditionTests +``` +✅ Async_condition_executed_synchronosuly_with_asynchronous_collection_rule +✅ Async_condition_executed_synchronosuly_with_asynchronous_rule +✅ Async_condition_executed_synchronosuly_with_synchronous_collection_role +✅ Async_condition_executed_synchronosuly_with_synchronous_role +✅ Async_condition_is_applied_to_all_validators_in_the_chain +✅ Async_condition_is_applied_to_all_validators_in_the_chain_when_executed_synchronously +✅ Async_condition_is_applied_to_single_validator_in_the_chain_when_ApplyConditionTo_set_to_CurrentValidator +✅ Condition_is_applied_to_all_validators_in_the_chain +✅ Condition_is_applied_to_single_validator_in_the_chain_when_ApplyConditionTo_set_to_CurrentValidator +✅ Sync_condition_is_applied_to_async_validators +✅ Validation_should_fail_when_async_condition_does_not_match +✅ Validation_should_fail_when_async_condition_matches +✅ Validation_should_fail_when_condition_does_not_match +✅ Validation_should_fail_when_condition_matches +✅ Validation_should_succeed_when_async_condition_does_not_match +✅ Validation_should_succeed_when_async_condition_matches +✅ Validation_should_succeed_when_condition_does_not_match +✅ Validation_should_succeed_when_condition_matches +``` +### ✅ FluentValidation.Tests.CreditCardValidatorTests +``` +✅ IsValidTests +✅ When_validation_fails_the_default_error_should_be_set +``` +### ✅ FluentValidation.Tests.CustomFailureActionTester +``` +✅ Does_not_invoke_action_if_validation_success +✅ Invokes_custom_action_on_failure +✅ Passes_object_being_validated_to_action +``` +### ✅ FluentValidation.Tests.CustomMessageFormatTester +``` +✅ Replaces_propertyvalue_placeholder +✅ Replaces_propertyvalue_with_empty_string_when_null +✅ Should_format_custom_message +✅ Uses_custom_delegate_for_building_message +✅ Uses_custom_delegate_for_building_message_only_for_specific_validator +✅ Uses_property_value_in_message +``` +### ✅ FluentValidation.Tests.CustomValidatorTester +``` +✅ New_Custom_Returns_single_failure +✅ New_Custom_Returns_single_failure_async +✅ New_custom_uses_empty_property_name_for_model_level_rule +✅ New_Custom_When_property_name_omitted_infers_property_name +✅ New_Custom_When_property_name_omitted_infers_property_name_nested +✅ New_Custom_within_ruleset +✅ New_CustomAsync_within_ruleset +✅ Perserves_property_chain_using_custom +✅ Runs_async_rule_synchronously_when_validator_invoked_synchronously +✅ Runs_sync_rule_asynchronously_when_validator_invoked_asynchronously +``` +### ✅ FluentValidation.Tests.DefaultValidatorExtensionTester +``` +✅ Empty_should_create_EmptyValidator +✅ Equal_should_create_EqualValidator_with_explicit_value +✅ Equal_should_create_EqualValidator_with_lambda +✅ GreaterThan_should_create_GreaterThanValidator_with_explicit_value +✅ GreaterThan_should_create_GreaterThanValidator_with_lambda +✅ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_explicit_value +✅ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_lambda +✅ GreaterThanOrEqual_should_create_GreaterThanOrEqualValidator_with_lambda_with_other_Nullable +✅ Length_should_create_ExactLengthValidator +✅ Length_should_create_LengthValidator +✅ Length_should_create_MaximumLengthValidator +✅ Length_should_create_MinimumLengthValidator +✅ LessThan_should_create_LessThanValidator_with_explicit_value +✅ LessThan_should_create_LessThanValidator_with_lambda +✅ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_explicit_value +✅ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_lambda +✅ LessThanOrEqual_should_create_LessThanOrEqualValidator_with_lambda_with_other_Nullable +✅ Must_should_create_PredicateValidator_with_context +✅ Must_should_create_PredicateValidator_with_PropertyValidatorContext +✅ Must_should_create_PredicteValidator +✅ MustAsync_should_create_AsyncPredicateValidator_with_context +✅ MustAsync_should_create_AsyncPredicateValidator_with_PropertyValidatorContext +✅ MustAsync_should_create_AsyncPredicteValidator +✅ MustAsync_should_not_throw_InvalidCastException +✅ NotEmpty_should_create_NotEmptyValidator +✅ NotEqual_should_create_NotEqualValidator_with_explicit_value +✅ NotEqual_should_create_NotEqualValidator_with_lambda +✅ NotNull_should_create_NotNullValidator +✅ ScalePrecision_should_create_ScalePrecisionValidator +✅ ScalePrecision_should_create_ScalePrecisionValidator_with_ignore_trailing_zeros +``` +### ✅ FluentValidation.Tests.EmailValidatorTests +``` +✅ Fails_email_validation_aspnetcore_compatible(email: " \r \t \n") +✅ Fails_email_validation_aspnetcore_compatible(email: "") +✅ Fails_email_validation_aspnetcore_compatible(email: "@someDomain.com") +✅ Fails_email_validation_aspnetcore_compatible(email: "@someDomain@abc.com") +✅ Fails_email_validation_aspnetcore_compatible(email: "0") +✅ Fails_email_validation_aspnetcore_compatible(email: "someName") +✅ Fails_email_validation_aspnetcore_compatible(email: "someName@") +✅ Fails_email_validation_aspnetcore_compatible(email: "someName@a@b.com") +✅ Invalid_email_addressex_regex(email: "") +✅ Invalid_email_addressex_regex(email: "first.last@test..co.uk") +✅ Invalid_email_addressex_regex(email: "testperso") +✅ Invalid_email_addressex_regex(email: "thisisaverylongstringcodeplex.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: " @someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "!#$%&'*+-/=?^_`|~@someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "\"firstName.lastName\"@someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "1234@someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "firstName.lastName@someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "someName@1234.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "someName@some_domain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "someName@some~domain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain￯.com") +✅ Valid_email_addresses_aspnetcore_compatible(email: null) +✅ Valid_email_addresses_regex(email: "__somename@example.com") +✅ Valid_email_addresses_regex(email: "!def!xyz%abc@example.com") +✅ Valid_email_addresses_regex(email: "\"Abc@def\"@example.com") +✅ Valid_email_addresses_regex(email: "\"Abc\\@def\"@example.com") +✅ Valid_email_addresses_regex(email: "\"Fred Bloggs\"@example.com") +✅ Valid_email_addresses_regex(email: "\"Joe\\Blow\"@example.com") +✅ Valid_email_addresses_regex(email: "$A12345@example.com") +✅ Valid_email_addresses_regex(email: "customer/department=shipping@example.com") +✅ Valid_email_addresses_regex(email: "first.last@test.co.uk") +✅ Valid_email_addresses_regex(email: "testperson@gmail.com") +✅ Valid_email_addresses_regex(email: "TestPerson@gmail.com") +✅ Valid_email_addresses_regex(email: "testperson+label@gmail.com") +✅ Valid_email_addresses_regex(email: null) +``` +### ✅ FluentValidation.Tests.EmptyTester +``` +✅ Passes_for_ienumerable_that_doesnt_implement_ICollection +✅ Passes_when_collection_empty +✅ When_there_is_a_value_then_the_validator_should_fail +✅ When_validation_fails_error_should_be_set +✅ When_value_is_Default_for_type_validator_should_pass_datetime +✅ When_value_is_Default_for_type_validator_should_pass_int +✅ When_value_is_empty_string_validator_should_pass +✅ When_value_is_null_validator_should_pass +✅ When_value_is_whitespace_validation_should_pass +``` +### ✅ FluentValidation.Tests.EnumValidatorTests +``` +✅ Flags_enum_invalid_when_using_outofrange_negative_value +✅ Flags_enum_invalid_when_using_outofrange_positive_value +✅ Flags_enum_valid_when_using_bitwise_value +✅ Flags_enum_validates_correctly_when_using_zero_value +✅ Flags_enum_with_overlapping_flags_valid_when_using_bitwise_value +✅ IsValidTests +✅ Nullable_enum_invalid_when_bad_value_specified +✅ Nullable_enum_valid_when_property_value_is_null +✅ Nullable_enum_valid_when_value_specified +✅ When_the_enum_is_initialized_with_invalid_value_then_the_validator_should_fail +✅ When_the_enum_is_not_initialized_with_valid_value_then_the_validator_should_fail +✅ When_validation_fails_the_default_error_should_be_set +``` +### ✅ FluentValidation.Tests.EqualValidatorTests +``` +✅ Comparison_property_uses_custom_resolver +✅ Should_store_comparison_type +✅ Should_store_property_to_compare +✅ Should_succeed_on_case_insensitive_comparison +✅ Should_succeed_on_case_insensitive_comparison_using_expression +✅ Should_use_ordinal_comparison_by_default +✅ Validates_against_property +✅ When_the_objects_are_equal_validation_should_succeed +✅ When_the_objects_are_not_equal_validation_should_fail +✅ When_validation_fails_the_error_should_be_set +``` +### ✅ FluentValidation.Tests.ExactLengthValidatorTester +``` +✅ Min_and_max_properties_should_be_set +✅ When_exact_length_rule_failes_error_should_have_exact_length_error_errorcode +✅ When_the_text_is_an_exact_length_the_validator_should_pass +✅ When_the_text_length_is_larger_the_validator_should_fail +✅ When_the_text_length_is_smaller_the_validator_should_fail +✅ When_the_validator_fails_the_error_message_should_be_set +``` +### ✅ FluentValidation.Tests.ExclusiveBetweenValidatorTests +``` +✅ To_and_from_properties_should_be_set +✅ To_and_from_properties_should_be_set_for_dates +✅ To_and_from_properties_should_be_set_for_strings +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_not_null +✅ When_the_text_is_larger_than_the_range_then_the_validator_should_fail +✅ When_the_text_is_larger_than_the_range_then_the_validator_should_fail_for_strings +✅ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw +✅ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw_for_strings +✅ When_the_validator_fails_the_error_message_should_be_set +✅ When_the_validator_fails_the_error_message_should_be_set_for_strings +✅ When_the_value_is_between_the_range_specified_then_the_validator_should_pass +✅ When_the_value_is_between_the_range_specified_then_the_validator_should_pass_for_strings +✅ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_fail +✅ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_fail_for_strings +✅ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_fail +✅ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_fail_for_strings +✅ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail +✅ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail_for_strings +``` +### ✅ FluentValidation.Tests.ExtensionTester +``` +✅ Should_extract_member_from_member_expression +✅ Should_return_null_for_non_member_expressions +✅ Should_split_pascal_cased_member_name +✅ SplitPascalCase_should_return_null_when_input_is_null +``` +### ✅ FluentValidation.Tests.ForEachRuleTests +``` +✅ Async_condition_should_work_with_child_collection +✅ Can_access_colletion_index +✅ Can_access_colletion_index_async +✅ Can_access_parent_index +✅ Can_access_parent_index_async +✅ Can_specify_condition_for_individual_collection_elements +✅ Can_use_cascade_with_RuleForEach +✅ Can_validate_collection_using_validator_for_base_type +✅ Collection_should_be_excluded +✅ Collection_should_be_explicitly_included_with_expression +✅ Collection_should_be_explicitly_included_with_string +✅ Condition_should_work_with_child_collection +✅ Correctly_gets_collection_indices +✅ Correctly_gets_collection_indices_async +✅ Executes_rule_for_each_item_in_collection +✅ Executes_rule_for_each_item_in_collection_async +✅ Nested_collection_for_null_property_should_not_throw_null_reference +✅ Nested_conditions_Rule_For +✅ Nested_conditions_Rule_For_Each +✅ Overrides_indexer +✅ Overrides_indexer_async +✅ Regular_rules_can_drop_into_RuleForEach +✅ RuleForEach_async_RunsTasksSynchronously +✅ Should_not_scramble_property_name_when_using_collection_validators_several_levels_deep +✅ Should_not_scramble_property_name_when_using_collection_validators_several_levels_deep_with_ValidateAsync +✅ Should_override_property_name +✅ Skips_null_items +✅ Top_level_collection +✅ Uses_useful_error_message_when_used_on_non_property +✅ Validates_child_validator_asynchronously +✅ Validates_child_validator_synchronously +✅ Validates_collection +✅ When_runs_outside_RuleForEach_loop +✅ When_runs_outside_RuleForEach_loop_async +``` +### ✅ FluentValidation.Tests.GreaterThanOrEqualToValidatorTester +``` +✅ Comparison_property_uses_custom_resolver +✅ Comparison_type +✅ Should_fail_when_less_than_input +✅ Should_localize_value +✅ Should_set_default_error_when_validation_fails +✅ Should_succeed_when_equal_to_input +✅ Should_succeed_when_greater_than_input +✅ Validates_nullable_with_nullable_property +✅ Validates_with_nullable_property +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_is_null_cross_property +✅ Validates_with_nullable_when_property_not_null +✅ Validates_with_nullable_when_property_not_null_cross_property +✅ Validates_with_property +``` +### ✅ FluentValidation.Tests.GreaterThanValidatorTester +``` +✅ Comparison_property_uses_custom_resolver +✅ Comparison_Type +✅ Should_fail_when_equal_to_input +✅ Should_fail_when_less_than_input +✅ Should_set_default_error_when_validation_fails +✅ Should_succeed_when_greater_than_input +✅ Validates_nullable_with_nullable_property +✅ Validates_with_nullable_property +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_is_null_cross_property +✅ Validates_with_nullable_when_property_not_null +✅ Validates_with_nullable_when_property_not_null_cross_property +✅ Validates_with_property +``` +### ✅ FluentValidation.Tests.InclusiveBetweenValidatorTests +``` +✅ To_and_from_properties_should_be_set +✅ To_and_from_properties_should_be_set_for_strings +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_not_null +✅ When_the_text_is_larger_than_the_range_then_the_validator_should_fail +✅ When_the_text_is_larger_than_the_range_then_the_validator_should_fail_for_strings +✅ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw +✅ When_the_to_is_smaller_than_the_from_then_the_validator_should_throw_for_strings +✅ When_the_validator_fails_the_error_message_should_be_set +✅ When_the_validator_fails_the_error_message_should_be_set_for_strings +✅ When_the_value_is_between_the_range_specified_then_the_validator_should_pass +✅ When_the_value_is_between_the_range_specified_then_the_validator_should_pass_for_strings +✅ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass +✅ When_the_value_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass_for_strings +✅ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass +✅ When_the_value_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass_for_strings +✅ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail +✅ When_the_value_is_smaller_than_the_range_then_the_validator_should_fail_for_strings +``` +### ✅ FluentValidation.Tests.InheritanceValidatorTest +``` +✅ Can_use_custom_subclass_with_nongeneric_overload +✅ Validates_collection +✅ Validates_collection_async +✅ Validates_inheritance_async +✅ Validates_inheritance_hierarchy +✅ Validates_ruleset +✅ Validates_ruleset_async +✅ Validates_with_callback +✅ Validates_with_callback_accepting_derived +✅ Validates_with_callback_accepting_derived_async +✅ Validates_with_callback_async +``` +### ✅ FluentValidation.Tests.InlineValidatorTester +``` +✅ Uses_inline_validator_to_build_rules +``` +### ✅ FluentValidation.Tests.LanguageManagerTests +``` +✅ All_languages_should_be_loaded +✅ All_localizations_have_same_parameters_as_English +✅ Always_use_specific_language +✅ Always_use_specific_language_with_string_source +✅ Can_replace_message +✅ Can_replace_message_without_overriding_all_languages +✅ Disables_localization +✅ Falls_back_to_default_localization_key_when_error_code_key_not_found +✅ Falls_back_to_english_when_culture_not_registered +✅ Falls_back_to_english_when_translation_missing +✅ Falls_back_to_parent_culture +✅ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn-BA") +✅ Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn") +✅ Gets_translation_for_bosnian_latin_culture(cultureName: "bs") +✅ Gets_translation_for_croatian_culture +✅ Gets_translation_for_culture +✅ Gets_translation_for_serbian_culture(cultureName: "sr-Latn-RS") +✅ Gets_translation_for_serbian_culture(cultureName: "sr-Latn") +✅ Gets_translation_for_serbian_culture(cultureName: "sr") +✅ Gets_translation_for_specific_culture +✅ Uses_error_code_as_localization_key +``` +### ✅ FluentValidation.Tests.LengthValidatorTests +``` +✅ Min_and_max_properties_should_be_set +✅ When_input_is_null_then_the_validator_should_pass +✅ When_the_max_is_smaller_than_the_min_then_the_validator_should_throw +✅ When_the_maxlength_validator_fails_the_error_message_should_be_set +✅ When_the_minlength_validator_fails_the_error_message_should_be_set +✅ When_the_text_is_between_the_lambda_range_specified_then_the_validator_should_pass +✅ When_the_text_is_between_the_range_specified_then_the_validator_should_pass +✅ When_the_text_is_exactly_the_size_of_the_lambda_lower_bound_then_the_validator_should_pass +✅ When_the_text_is_exactly_the_size_of_the_lambda_upper_bound_then_the_validator_should_pass +✅ When_the_text_is_exactly_the_size_of_the_lower_bound_then_the_validator_should_pass +✅ When_the_text_is_exactly_the_size_of_the_upper_bound_then_the_validator_should_pass +✅ When_the_text_is_larger_than_the_lambda_range_then_the_validator_should_fail +✅ When_the_text_is_larger_than_the_range_then_the_validator_should_fail +✅ When_the_text_is_smaller_than_the_lambda_range_then_the_validator_should_fail +✅ When_the_text_is_smaller_than_the_range_then_the_validator_should_fail +✅ When_the_validator_fails_the_error_message_should_be_set +``` +### ✅ FluentValidation.Tests.LessThanOrEqualToValidatorTester +``` +✅ Comparison_property_uses_custom_resolver +✅ Comparison_type +✅ Should_fail_when_greater_than_input +✅ Should_set_default_error_when_validation_fails +✅ Should_succeed_when_equal_to_input +✅ Should_succeed_when_less_than_input +✅ Validates_nullable_with_nullable_property +✅ Validates_with_nullable_property +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_is_null_cross_property +✅ Validates_with_nullable_when_property_not_null +✅ Validates_with_nullable_when_property_not_null_cross_property +✅ Validates_with_property +``` +### ✅ FluentValidation.Tests.LessThanValidatorTester +``` +✅ Comparison_property_uses_custom_resolver +✅ Comparison_type +✅ Extracts_property_from_constant_using_expression +✅ Extracts_property_from_expression +✅ Should_fail_when_equal_to_input +✅ Should_fail_when_greater_than_input +✅ Should_set_default_validation_message_when_validation_fails +✅ Should_succeed_when_less_than_input +✅ Should_throw_when_value_to_compare_is_null +✅ Validates_against_property +✅ Validates_nullable_with_nullable_property +✅ Validates_with_nullable_property +✅ Validates_with_nullable_when_property_is_null +✅ Validates_with_nullable_when_property_not_null +✅ Validates_with_nullable_when_property_not_null_cross_property +✅ Validates_with_nullable_when_property_null_cross_property +``` +### ✅ FluentValidation.Tests.LocalisedMessagesTester +``` +✅ Correctly_assigns_default_localized_error_message +✅ Does_not_throw_InvalidCastException_when_using_RuleForEach +✅ Formats_string_with_placeholders +✅ Formats_string_with_placeholders_when_you_cant_edit_the_string +✅ Uses_func_to_get_message +✅ Uses_string_format_with_property_value +``` +### ✅ FluentValidation.Tests.LocalisedNameTester +``` +✅ Uses_localized_name +✅ Uses_localized_name_expression +``` +### ✅ FluentValidation.Tests.MemberAccessorTests +``` +✅ ComplexPropertyGet +✅ ComplexPropertySet +✅ Equality +✅ ImplicitCast +✅ Name +✅ SimpleFieldGet +✅ SimpleFieldSet +✅ SimplePropertyGet +✅ SimplePropertySet +``` +### ✅ FluentValidation.Tests.MessageFormatterTests +``` +✅ Adds_argument_and_custom_arguments +✅ Adds_formatted_argument_and_custom_arguments +✅ Adds_formatted_argument_and_formatted_custom_arguments +✅ Adds_PropertyName_to_message +✅ Adds_value_to_message +✅ Format_property_value +✅ Should_ignore_unknown_numbered_parameters +✅ Should_ignore_unknown_parameters +✅ Understands_date_formats +✅ Understands_numeric_formats +``` +### ✅ FluentValidation.Tests.ModelLevelValidatorTests +``` +✅ Can_use_child_validator_at_model_level +✅ Validates_at_model_level +``` +### ✅ FluentValidation.Tests.NameResolutionPluggabilityTester +``` +✅ Resolves_nested_properties +✅ ShouldHaveValidationError_Should_support_custom_propertynameresolver +✅ Uses_custom_property_name +``` +### ✅ FluentValidation.Tests.NotEmptyTester +``` +✅ Fails_for_array +✅ Fails_for_ienumerable_that_doesnt_implement_ICollection +✅ Fails_when_collection_empty +✅ When_there_is_a_value_then_the_validator_should_pass +✅ When_validation_fails_error_should_be_set +✅ When_value_is_Default_for_type_validator_should_fail_datetime +✅ When_value_is_Default_for_type_validator_should_fail_int +✅ When_value_is_empty_string_validator_should_fail +✅ When_value_is_null_validator_should_fail +✅ When_value_is_whitespace_validation_should_fail +``` +### ✅ FluentValidation.Tests.NotEqualValidatorTests +``` +✅ Comparison_property_uses_custom_resolver +✅ Should_handle_custom_value_types_correctly +✅ Should_not_be_valid_for_case_insensitve_comparison +✅ Should_not_be_valid_for_case_insensitve_comparison_with_expression +✅ Should_store_comparison_type +✅ Should_store_property_to_compare +✅ Should_use_ordinal_comparison_by_default +✅ Validates_across_properties +✅ When_the_objects_are_equal_then_the_validator_should_fail +✅ When_the_objects_are_not_equal_then_the_validator_should_pass +✅ When_the_validator_fails_the_error_message_should_be_set +``` +### ✅ FluentValidation.Tests.NotNullTester +``` +✅ Fails_when_nullable_value_type_is_null +✅ Not_null_validator_should_not_crash_with_non_nullable_value_type +✅ NotNullValidator_should_fail_if_value_is_null +✅ NotNullValidator_should_pass_if_value_has_value +✅ When_the_validator_fails_the_error_message_should_be_set +``` +### ✅ FluentValidation.Tests.NullTester +``` +✅ Not_null_validator_should_not_crash_with_non_nullable_value_type +✅ NullValidator_should_fail_if_value_has_value +✅ NullValidator_should_pass_if_value_is_null +✅ Passes_when_nullable_value_type_is_null +✅ When_the_validator_passes_the_error_message_should_be_set +``` +### ✅ FluentValidation.Tests.OnFailureTests +``` +✅ OnFailure_called_for_each_failed_rule +✅ OnFailure_called_for_each_failed_rule_asyncAsync +✅ Should_be_able_to_access_error_message_in_OnFailure +✅ ShouldHaveChildValidator_should_be_true +✅ ShouldHaveChildValidator_works_with_Include +✅ WhenAsyncWithOnFailure_should_invoke_condition_on_async_inner_validator +✅ WhenAsyncWithOnFailure_should_invoke_condition_on_inner_validator +✅ WhenAsyncWithOnFailure_should_invoke_condition_on_inner_validator_invoked_synchronously +✅ WhenWithOnFailure_should_invoke_condition_on_async_inner_validator +✅ WhenWithOnFailure_should_invoke_condition_on_inner_validator +``` +### ✅ FluentValidation.Tests.PredicateValidatorTester +``` +✅ Should_fail_when_predicate_returns_false +✅ Should_succeed_when_predicate_returns_true +✅ Should_throw_when_predicate_is_null +✅ When_validation_fails_metadata_should_be_set_on_failure +✅ When_validation_fails_the_default_error_should_be_set +``` +### ✅ FluentValidation.Tests.PropertyChainTests +``` +✅ AddIndexer_throws_when_nothing_added +✅ Calling_ToString_should_construct_string_representation_of_chain +✅ Calling_ToString_should_construct_string_representation_of_chain_with_indexers +✅ Creates_from_expression +✅ Should_be_subchain +✅ Should_ignore_blanks +✅ Should_not_be_subchain +``` +### ✅ FluentValidation.Tests.RegularExpressionValidatorTests +``` +✅ Can_access_expression_in_message +✅ Can_access_expression_in_message_lambda +✅ Can_access_expression_in_message_lambda_regex +✅ Uses_lazily_loaded_expression +✅ Uses_lazily_loaded_expression_with_options +✅ Uses_regex_object +✅ When_the_text_does_not_match_the_lambda_regex_regular_expression_then_the_validator_should_fail +✅ When_the_text_does_not_match_the_lambda_regular_expression_then_the_validator_should_fail +✅ When_the_text_does_not_match_the_regular_expression_then_the_validator_should_fail +✅ When_the_text_is_empty_then_the_validator_should_fail +✅ When_the_text_is_null_then_the_validator_should_pass +✅ When_the_text_matches_the_lambda_regex_regular_expression_then_the_validator_should_pass +✅ When_the_text_matches_the_lambda_regular_expression_then_the_validator_should_pass +✅ When_the_text_matches_the_regular_expression_then_the_validator_should_pass +✅ When_validation_fails_the_default_error_should_be_set +``` +### ✅ FluentValidation.Tests.RuleBuilderTests +``` +✅ Adding_a_validator_should_return_builder +✅ Adding_a_validator_should_store_validator +✅ Calling_validate_should_delegate_to_underlying_validator +✅ Calling_ValidateAsync_should_delegate_to_underlying_async_validator +✅ Calling_ValidateAsync_should_delegate_to_underlying_sync_validator +✅ Conditional_child_validator_should_register_with_validator_type_not_property +✅ Nullable_object_with_async_condition_should_not_throw +✅ Nullable_object_with_condition_should_not_throw +✅ Property_should_return_null_when_it_is_not_a_property_being_validated +✅ Property_should_return_property_being_validated +✅ PropertyDescription_should_return_custom_property_name +✅ PropertyDescription_should_return_property_name_split +✅ Result_should_use_custom_property_name_when_no_property_name_can_be_determined +✅ Rule_for_a_non_memberexpression_should_not_generate_property_name +✅ Should_build_property_name +✅ Should_compile_expression +✅ Should_set_custom_error +✅ Should_set_custom_property_name +✅ Should_throw_if_message_is_null +✅ Should_throw_if_overriding_validator_is_null +✅ Should_throw_if_overriding_validator_provider_is_null +✅ Should_throw_if_property_name_is_null +✅ Should_throw_if_validator_is_null +✅ Should_throw_when_async_inverse_predicate_is_null +✅ Should_throw_when_async_predicate_is_null +✅ Should_throw_when_context_predicate_is_null +✅ Should_throw_when_inverse_context_predicate_is_null +✅ Should_throw_when_inverse_predicate_is_null +✅ Should_throw_when_predicate_is_null +``` +### ✅ FluentValidation.Tests.RuleDependencyTests +``` +✅ Async_inside_dependent_rules +✅ Async_inside_dependent_rules_when_parent_rule_not_async +✅ Dependent_rules_inside_ruleset +✅ Dependent_rules_inside_when +✅ Does_not_invoke_dependent_rule_if_parent_rule_does_not_pass +✅ Invokes_dependent_rule_if_parent_rule_passes +✅ Nested_dependent_rules +✅ Nested_dependent_rules_inside_ruleset +✅ Nested_dependent_rules_inside_ruleset_inside_method +✅ Nested_dependent_rules_inside_ruleset_no_result_when_second_level_fails +✅ Nested_dependent_rules_inside_ruleset_no_result_when_top_level_fails +✅ TestAsyncWithDependentRules_AsyncEntry +✅ TestAsyncWithDependentRules_SyncEntry +✅ Treats_root_level_RuleFor_call_as_dependent_rule_if_user_forgets_to_use_DependentRulesBuilder +``` +### ✅ FluentValidation.Tests.RulesetTests +``` +✅ Applies_multiple_rulesets_to_rule +✅ Combines_rulesets_and_explicit_properties +✅ Combines_rulesets_and_explicit_properties_async +✅ Executes_all_rules +✅ Executes_in_rule_in_default_and_none +✅ Executes_in_rule_in_ruleset_and_default +✅ Executes_multiple_rulesets +✅ Executes_rules_in_default_ruleset_and_specific_ruleset +✅ Executes_rules_in_specified_ruleset +✅ Executes_rules_not_specified_in_ruleset +✅ Includes_all_rulesets +✅ Includes_all_rulesets_async +✅ Includes_combination_of_rulesets +✅ Includes_combination_of_rulesets_async +✅ Ruleset_cascades_to_child_collection_validator +✅ Ruleset_cascades_to_child_validator +✅ Ruleset_selection_should_cascade_downwards_with_when_setting_child_validator_using_include_statement +✅ Ruleset_selection_should_cascade_downwards_with_when_setting_child_validator_using_include_statement_with_lambda +✅ Ruleset_selection_should_not_cascade_downwards_when_set_on_property +✅ Trims_spaces +✅ WithMessage_works_inside_rulesets +``` +### ✅ FluentValidation.Tests.ScalePrecisionValidatorTests +``` +✅ Scale_precision_should_be_valid +✅ Scale_precision_should_be_valid_when_ignoring_trailing_zeroes +✅ Scale_precision_should_be_valid_when_they_are_equal +✅ Scale_precision_should_not_be_valid +✅ Scale_precision_should_not_be_valid_when_ignoring_trailing_zeroes +✅ Scale_precision_should_not_be_valid_when_they_are_equal +``` +### ✅ FluentValidation.Tests.SharedConditionTests +``` +✅ Async_condition_can_be_used_inside_ruleset +✅ Condition_can_be_used_inside_ruleset +✅ Does_not_execute_custom_Rule_when_async_condition_false +✅ Does_not_execute_custom_Rule_when_condition_false +✅ Does_not_execute_customasync_Rule_when_async_condition_false +✅ Does_not_execute_customasync_Rule_when_condition_false +✅ Doesnt_throw_NullReferenceException_when_instance_not_null +✅ Doesnt_throw_NullReferenceException_when_instance_not_null_async +✅ Executes_custom_rule_when_async_condition_true +✅ Executes_custom_rule_when_condition_true +✅ Executes_customasync_rule_when_async_condition_true +✅ Executes_customasync_rule_when_condition_true +✅ Nested_async_conditions_with_Custom_rule +✅ Nested_async_conditions_with_CustomAsync_rule +✅ Nested_conditions_with_Custom_rule +✅ Nested_conditions_with_CustomAsync_rule +✅ Outer_async_Unless_clause_will_trump_an_inner_Unless_clause_when_inner_fails_but_the_outer_is_satisfied +✅ Outer_Unless_clause_will_trump_an_inner_Unless_clause_when_inner_fails_but_the_outer_is_satisfied +✅ Rules_invoke_when_inverse_shared_async_condition_matches +✅ Rules_invoke_when_inverse_shared_condition_matches +✅ Rules_not_invoked_when_inverse_shared_async_condition_does_not_match +✅ Rules_not_invoked_when_inverse_shared_condition_does_not_match +✅ RuleSet_can_be_used_inside_async_condition +✅ RuleSet_can_be_used_inside_condition +✅ Runs_otherwise_conditions_for_UnlessAsync +✅ Runs_otherwise_conditions_for_When +✅ Runs_otherwise_conditions_for_WhenAsync +✅ Runs_otherwise_conditons_for_Unless +✅ Shared_async_When_is_applied_to_groupd_rules_when_initial_predicate_is_true_and_all_individual_rules_are_satisfied +✅ Shared_async_When_is_applied_to_grouped_rules_when_initial_predicate_is_true +✅ Shared_async_When_is_not_applied_to_grouped_rules_when_initial_predicate_is_false +✅ Shared_async_When_respects_the_smaller_scope_of_a_inner_Unless_when_the_inner_Unless_predicate_fails +✅ Shared_async_When_respects_the_smaller_scope_of_an_inner_Unless_when_the_inner_Unless_predicate_is_satisfied +✅ Shared_When_is_applied_to_groupd_rules_when_initial_predicate_is_true_and_all_individual_rules_are_satisfied +✅ Shared_When_is_applied_to_grouped_rules_when_initial_predicate_is_true +✅ Shared_When_is_not_applied_to_grouped_rules_when_initial_predicate_is_false +✅ Shared_When_respects_the_smaller_scope_of_a_inner_Unless_when_the_inner_Unless_predicate_fails +✅ Shared_When_respects_the_smaller_scope_of_an_inner_Unless_when_the_inner_Unless_predicate_is_satisfied +✅ When_async_condition_executed_for_each_instance_of_RuleForEach_condition_should_not_be_cached +✅ When_condition_executed_for_each_instance_of_RuleForEach_condition_should_not_be_cached +✅ When_condition_only_executed_once +✅ WhenAsync_condition_only_executed_once +``` +### ✅ FluentValidation.Tests.StandalonePropertyValidationTester +``` +✅ Should_validate_property_value_without_instance +``` +### ✅ FluentValidation.Tests.StringEnumValidatorTests +``` +✅ IsValidTests_CaseInsensitive_CaseCorrect +✅ IsValidTests_CaseInsensitive_CaseIncorrect +✅ IsValidTests_CaseSensitive_CaseCorrect +✅ IsValidTests_CaseSensitive_CaseIncorrect +✅ When_enumType_is_not_an_enum_it_should_throw +✅ When_enumType_is_null_it_should_throw +✅ When_the_property_is_initialized_with_empty_string_then_the_validator_should_fail +✅ When_the_property_is_initialized_with_invalid_string_then_the_validator_should_fail +✅ When_the_property_is_initialized_with_null_then_the_validator_should_be_valid +✅ When_validation_fails_the_default_error_should_be_set +``` +### ✅ FluentValidation.Tests.TrackingCollectionTests +``` +✅ Add_AddsItem +✅ Should_not_raise_event_once_handler_detached +✅ When_Item_Added_Raises_ItemAdded +``` +### ✅ FluentValidation.Tests.TransformTests +``` +✅ Transforms_collection_element +✅ Transforms_collection_element_async +✅ Transforms_property_value +✅ Transforms_property_value_to_another_type +``` +### ✅ FluentValidation.Tests.UserSeverityTester +``` +✅ Can_Provide_conditional_severity +✅ Can_Provide_severity_for_item_in_collection +✅ Correctly_provides_object_being_validated +✅ Defaults_user_severity_to_error +✅ Should_use_last_supplied_severity +✅ Stores_user_severity_against_validation_failure +✅ Throws_when_provider_is_null +``` +### ✅ FluentValidation.Tests.UserStateTester +``` +✅ Can_Provide_state_for_item_in_collection +✅ Correctly_provides_object_being_validated +✅ Stores_user_state_against_validation_failure +✅ Throws_when_provider_is_null +``` +### ✅ FluentValidation.Tests.ValidateAndThrowTester +``` +✅ Does_not_throw_when_valid +✅ Does_not_throw_when_valid_and_a_ruleset +✅ Does_not_throw_when_valid_and_a_ruleset_async +✅ Does_not_throw_when_valid_async +✅ Only_root_validator_throws +✅ Populates_errors +✅ Serializes_exception +✅ Throws_exception +✅ Throws_exception_async +✅ Throws_exception_with_a_ruleset +✅ Throws_exception_with_a_ruleset_async +✅ ToString_provides_error_details +✅ ValidationException_provides_correct_message_when_appendDefaultMessage_false +✅ ValidationException_provides_correct_message_when_appendDefaultMessage_true +``` +### ✅ FluentValidation.Tests.ValidationResultTests +``` +✅ Can_serialize_failure +✅ Can_serialize_result +✅ Should_add_errors +✅ Should_be_valid_when_there_are_no_errors +✅ Should_not_be_valid_when_there_are_errors +✅ ToString_return_empty_string_when_there_is_no_error +✅ ToString_return_error_messages_with_given_separator +✅ ToString_return_error_messages_with_newline_as_separator +``` +### ✅ FluentValidation.Tests.ValidatorDescriptorTester +``` +✅ Does_not_throw_when_rule_declared_without_property +✅ Gets_validators_for_property +✅ GetValidatorsForMember_and_GetRulesForMember_can_both_retrieve_for_model_level_rule +✅ Returns_empty_collection_for_property_with_no_validators +✅ Should_retrieve_name_given_to_it_pass_property_as_string +``` +### ✅ FluentValidation.Tests.ValidatorSelectorTests +``` +✅ Can_use_property_with_include +✅ Does_not_validate_other_property +✅ Does_not_validate_other_property_using_expression +✅ Executes_correct_rule_when_using_property_with_include +✅ Executes_correct_rule_when_using_property_with_include_async +✅ Includes_nested_property +✅ Includes_nested_property_using_expression +✅ MemberNameValidatorSelector_returns_true_when_property_name_matches +✅ Validates_nullable_property_with_overriden_name_when_selected +✅ Validates_property_using_expression +``` +### ✅ FluentValidation.Tests.ValidatorTesterTester +``` +✅ Allows_only_one_failure_to_match +✅ Can_use_indexer_in_string_message +✅ Can_use_indexer_in_string_message_inverse +✅ Expected_error_code_check +✅ Expected_message_argument_check +✅ Expected_message_check +✅ Expected_severity_check +✅ Expected_state_check +✅ Matches_any_failure +✅ Matches_model_level_rule +✅ Model_level_check_fails_if_no_model_level_failures +✅ ShouldHaveChildValidator_should_not_throw_when_property_Does_have_child_validator +✅ ShouldHaveChildValidator_should_not_throw_when_property_Does_have_child_validator_and_expecting_a_basetype +✅ ShouldHaveChildValidator_should_not_throw_when_property_has_collection_validators +✅ ShouldHaveChildValidator_should_throw_when_property_has_a_different_child_validator +✅ ShouldHaveChildValidator_should_work_with_DependentRules +✅ ShouldHaveChildvalidator_throws_when_collection_property_Does_not_have_child_validator +✅ ShouldHaveChildValidator_throws_when_property_does_not_have_child_validator +✅ ShouldHaveChildValidator_works_on_model_level_rules +✅ ShouldHaveValidationError_async +✅ ShouldHaveValidationError_async_throws +✅ ShouldHaveValidationError_model_async +✅ ShouldHaveValidationError_model_async_throws +✅ ShouldHaveValidationError_preconstructed_object_does_not_throw_for_unwritable_property +✅ ShouldHaveValidationError_should_not_throw_when_there_are_errors_with_preconstructed_object +✅ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors +✅ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "") +✅ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null) +✅ ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors_ruleforeach +✅ ShouldHaveValidationError_Should_support_nested_properties +✅ ShouldHaveValidationError_Should_throw_when_there_are_no_validation_errors +✅ ShouldHaveValidationError_should_throw_when_there_are_no_validation_errors_with_preconstructed_object +✅ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "") +✅ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "cardNumber") +✅ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: null) +✅ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 42, cardNumber: "cardNumber") +✅ ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors_ruleforeach +✅ ShouldHaveValidationError_with_an_unmatched_rule_and_a_single_error_should_throw_an_exception +✅ ShouldHaveValidationError_with_an_unmatched_rule_and_multiple_errors_should_throw_an_exception +✅ ShouldHaveValidationErrorFor_takes_account_of_rulesets +✅ ShouldHaveValidationErrorFor_takes_account_of_rulesets_fluent_approach +✅ ShouldNotHaveValidationError_async +✅ ShouldNotHaveValidationError_async_model_throws +✅ ShouldNotHaveValidationError_async_throws +✅ ShouldNotHaveValidationError_model_async +✅ ShouldNotHaveValidationError_should_correctly_handle_explicitly_providing_object_to_validate +✅ ShouldNotHaveValidationError_should_correctly_handle_explicitly_providing_object_to_validate_and_other_property_fails_validation +✅ ShouldNotHaveValidationError_should_have_validation_error_details_when_thrown_ruleforeach +✅ ShouldNotHaveValidationError_should_not_throw_when_there_are_no_errors +✅ ShouldNotHAveValidationError_should_not_throw_When_there_are_no_errors_with_preconstructed_object +✅ ShouldNotHaveValidationError_should_not_throw_when_there_are_not_validation_errors_ruleforeach +✅ ShouldNotHaveValidationError_Should_support_nested_properties +✅ ShouldNotHaveValidationError_should_throw_when_there_are_errors +✅ ShouldNotHaveValidationError_should_throw_when_there_are_errors_with_preconstructed_object +✅ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "") +✅ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "cardNumber") +✅ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: null) +✅ ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "cardNumber") +✅ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "") +✅ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: null) +✅ ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors_ruleforeach +✅ Tests_nested_property +✅ Tests_nested_property_reverse +✅ Tests_nested_property_using_obsolete_method +✅ TestValidate_runs_async +✅ TestValidate_runs_async_throws +✅ Unexpected_error_code_check +✅ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["bar"]) +✅ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo", "bar"]) +✅ Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo"]) +✅ Unexpected_message_check(withoutErrMsg: "bar", errMessages: []) +✅ Unexpected_severity_check +✅ Unexpected_state_check +``` +
\ No newline at end of file diff --git a/__tests__/__outputs__/golang-json.md b/__tests__/__outputs__/golang-json.md new file mode 100644 index 0000000..8b63704 --- /dev/null +++ b/__tests__/__outputs__/golang-json.md @@ -0,0 +1,38 @@ +![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%206%20failed%2C%201%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/golang-json.json](#user-content-r0)|5 ✅|6 ❌|1 ⚪|6s| +## ❌ fixtures/golang-json.json +**12** tests were completed in **6s** with **5** passed, **6** failed and **1** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[_/home/james_t/git/test-reporter/reports/go](#user-content-r0s0)|5 ✅|6 ❌|1 ⚪|6s| +### ❌ _/home/james_t/git/test-reporter/reports/go +``` +✅ TestPassing +❌ TestFailing + calculator_test.go:19: expected 1+1 = 3, got 2 + +❌ TestPanicInsideFunction + calculator_test.go:76: caught panic: runtime error: integer divide by zero + +❌ TestPanicInsideTest + calculator_test.go:76: caught panic: bad stuff + +⚪ TestSkipped + calculator_test.go:45: skipping test + +❌ TestCases + +TestCases + ✅ 1_+_2_=_3 + ✅ 4_+_7_=_11 + ❌ 2_+_3_=_4 + calculator_test.go:67: expected 2 + 3 = 4, got 5 + + ❌ 1_/_2_=_1 + calculator_test.go:67: expected 1 / 2 = 1, got 0 + + ✅ 9_/_3_=_3 + ✅ 14_/_7_=_2 +``` \ No newline at end of file diff --git a/__tests__/__outputs__/jest-junit-eslint.md b/__tests__/__outputs__/jest-junit-eslint.md new file mode 100644 index 0000000..5ebb57e --- /dev/null +++ b/__tests__/__outputs__/jest-junit-eslint.md @@ -0,0 +1,17 @@ +![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success) +
Expand for details + +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/jest-junit-eslint.xml](#user-content-r0)|1 ✅|||0ms| +## ✅ fixtures/jest-junit-eslint.xml +**1** tests were completed in **0ms** with **1** passed, **0** failed and **0** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[test.jsx](#user-content-r0s0)|1 ✅|||0ms| +### ✅ test.jsx +``` +test + ✅ test.jsx +``` +
\ No newline at end of file diff --git a/__tests__/__outputs__/jest-junit.md b/__tests__/__outputs__/jest-junit.md index 5aecf5d..951256f 100644 --- a/__tests__/__outputs__/jest-junit.md +++ b/__tests__/__outputs__/jest-junit.md @@ -1,14 +1,17 @@ ![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical) -## ❌ fixtures/jest-junit.xml +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/jest-junit.xml](#user-content-r0)|1 ✅|4 ❌|1 ⚪|1s| +## ❌ fixtures/jest-junit.xml **6** tests were completed in **1s** with **1** passed, **4** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[__tests__\main.test.js](#r0s0)|1✔️|3❌||486ms| -|[__tests__\second.test.js](#r0s1)||1❌|1✖️|82ms| -### ❌ __tests__\main.test.js +|[__tests__\main.test.js](#user-content-r0s0)|1 ✅|3 ❌||486ms| +|[__tests__\second.test.js](#user-content-r0s1)||1 ❌|1 ⚪|82ms| +### ❌ __tests__\main.test.js ``` Test 1 - ✔️ Passing test + ✅ Passing test Test 1 › Test 1.1 ❌ Failing test Error: expect(received).toBeTruthy() @@ -18,9 +21,9 @@ Test 2 ❌ Exception in test Error: Some error ``` -### ❌ __tests__\second.test.js +### ❌ __tests__\second.test.js ``` ❌ Timeout test : Timeout - Async callback was not invoked within the 1 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 1 ms timeout specified by jest.setTimeout.Error: -✖️ Skipped test +⚪ Skipped test ``` \ No newline at end of file diff --git a/__tests__/__outputs__/jest-react-component-test-results.md b/__tests__/__outputs__/jest-react-component-test-results.md new file mode 100644 index 0000000..1365818 --- /dev/null +++ b/__tests__/__outputs__/jest-react-component-test-results.md @@ -0,0 +1,16 @@ +![Tests passed successfully](https://img.shields.io/badge/tests-1%20passed-success) +
Expand for details + +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/jest/jest-react-component-test-results.xml](#user-content-r0)|1 ✅|||1000ms| +## ✅ fixtures/external/jest/jest-react-component-test-results.xml +**1** tests were completed in **1000ms** with **1** passed, **0** failed and **0** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[\](#user-content-r0s0)|1 ✅|||798ms| +### ✅ \ +``` +✅ should render properly +``` +
\ No newline at end of file diff --git a/__tests__/__outputs__/jest-test-results.md b/__tests__/__outputs__/jest-test-results.md index ed545bf..cfbc169 100644 --- a/__tests__/__outputs__/jest-test-results.md +++ b/__tests__/__outputs__/jest-test-results.md @@ -1,432 +1,6462 @@ ![Tests failed](https://img.shields.io/badge/tests-4207%20passed%2C%202%20failed%2C%2030%20skipped-critical) -## ❌ fixtures/external/jest/jest-test-results.xml +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/jest/jest-test-results.xml](#user-content-r0)|4207 ✅|2 ❌|30 ⚪|166s| +## ❌ fixtures/external/jest/jest-test-results.xml **4239** tests were completed in **166s** with **4207** passed, **2** failed and **30** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|e2e/__tests__/asyncAndCallback.test.ts|1✔️|||746ms| -|e2e/__tests__/asyncRegenerator.test.ts|1✔️|||4s| -|e2e/__tests__/autoClearMocks.test.ts|2✔️|||2s| -|e2e/__tests__/autoResetMocks.test.ts|2✔️|||2s| -|e2e/__tests__/autoRestoreMocks.test.ts|2✔️|||2s| -|e2e/__tests__/babelPluginJestHoist.test.ts|1✔️|||6s| -|e2e/__tests__/badSourceMap.test.ts|1✔️|||858ms| -|e2e/__tests__/beforeAllFiltered.ts|1✔️|||958ms| -|e2e/__tests__/beforeEachQueue.ts|1✔️||1✖️|55ms| -|e2e/__tests__/callDoneTwice.test.ts|1✔️|||882ms| -|e2e/__tests__/chaiAssertionLibrary.ts|1✔️|||2s| -|e2e/__tests__/circularInequality.test.ts|1✔️|||1s| -|e2e/__tests__/circusConcurrentEach.test.ts|2✔️|||2s| -|e2e/__tests__/circusDeclarationErrors.test.ts|1✔️|||869ms| -|e2e/__tests__/clearCache.test.ts|2✔️|||1s| -|e2e/__tests__/cliHandlesExactFilenames.test.ts|2✔️|||1s| -|e2e/__tests__/compareDomNodes.test.ts|1✔️|||1s| -|e2e/__tests__/config.test.ts|6✔️|||4s| -|e2e/__tests__/console.test.ts|7✔️|||8s| -|e2e/__tests__/consoleAfterTeardown.test.ts|1✔️|||1s| -|e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts|1✔️|||793ms| -|e2e/__tests__/coverageHandlebars.test.ts|1✔️|||2s| -|e2e/__tests__/coverageRemapping.test.ts|1✔️|||13s| -|e2e/__tests__/coverageReport.test.ts|12✔️|||22s| -|e2e/__tests__/coverageThreshold.test.ts|5✔️|||5s| -|e2e/__tests__/coverageTransformInstrumented.test.ts|1✔️|||5s| -|e2e/__tests__/coverageWithoutTransform.test.ts|1✔️|||1s| -|e2e/__tests__/createProcessObject.test.ts|1✔️|||908ms| -|e2e/__tests__/customInlineSnapshotMatchers.test.ts|1✔️|||2s| -|e2e/__tests__/customMatcherStackTrace.test.ts|2✔️|||2s| -|e2e/__tests__/customReporters.test.ts|9✔️|||7s| -|e2e/__tests__/customResolver.test.ts|1✔️|||826ms| -|e2e/__tests__/customTestSequencers.test.ts|3✔️|||3s| -|e2e/__tests__/debug.test.ts|1✔️|||899ms| -|e2e/__tests__/declarationErrors.test.ts|3✔️|||2s| -|e2e/__tests__/dependencyClash.test.ts|1✔️|||833ms| -|e2e/__tests__/detectOpenHandles.ts|8✔️|||8s| -|e2e/__tests__/domDiffing.test.ts|1✔️|||1s| -|e2e/__tests__/doneInHooks.test.ts|1✔️|||855ms| -|e2e/__tests__/dynamicRequireDependencies.ts|1✔️|||847ms| -|e2e/__tests__/each.test.ts|7✔️|||5s| -|e2e/__tests__/emptyDescribeWithHooks.test.ts|4✔️|||3s| -|e2e/__tests__/emptySuiteError.test.ts|1✔️|||885ms| -|e2e/__tests__/env.test.ts|6✔️|||5s| -|e2e/__tests__/environmentAfterTeardown.test.ts|1✔️|||892ms| -|e2e/__tests__/errorOnDeprecated.test.ts|1✔️||24✖️|56ms| -|e2e/__tests__/esmConfigFile.test.ts|3✔️|||526ms| -|e2e/__tests__/executeTestsOnceInMpr.ts|1✔️|||976ms| -|e2e/__tests__/existentRoots.test.ts|4✔️|||627ms| -|e2e/__tests__/expectAsyncMatcher.test.ts|2✔️|||3s| -|e2e/__tests__/expectInVm.test.ts|1✔️|||2s| -|e2e/__tests__/extraGlobals.test.ts|1✔️|||1s| -|e2e/__tests__/failureDetailsProperty.test.ts|1✔️|||907ms| -|e2e/__tests__/failures.test.ts|7✔️|||10s| -|e2e/__tests__/fakePromises.test.ts|2✔️|||2s| -|e2e/__tests__/fatalWorkerError.test.ts|1✔️|||3s| -|e2e/__tests__/filter.test.ts|7✔️|||5s| -|e2e/__tests__/findRelatedFiles.test.ts|5✔️|||6s| -|e2e/__tests__/focusedTests.test.ts|1✔️|||888ms| -|e2e/__tests__/forceExit.test.ts|1✔️|||2s| -|e2e/__tests__/generatorMock.test.ts|1✔️|||1s| -|e2e/__tests__/global-mutation.test.ts|1✔️|||40ms| -|e2e/__tests__/global.test.ts|1✔️|||31ms| -|e2e/__tests__/globals.test.ts|10✔️|||8s| -|e2e/__tests__/globalSetup.test.ts|10✔️|||14s| -|e2e/__tests__/globalTeardown.test.ts|7✔️|||12s| -|e2e/__tests__/hasteMapMockChanged.test.ts|1✔️|||379ms| -|e2e/__tests__/hasteMapSha1.test.ts|1✔️|||298ms| -|e2e/__tests__/hasteMapSize.test.ts|2✔️|||397ms| -|e2e/__tests__/importedGlobals.test.ts|1✔️|||1s| -|e2e/__tests__/injectGlobals.test.ts|2✔️|||2s| -|e2e/__tests__/jasmineAsync.test.ts|15✔️|||28s| -|e2e/__tests__/jasmineAsyncWithPendingDuringTest.ts|1✔️||1✖️|72ms| -|e2e/__tests__/jest.config.js.test.ts|3✔️|||2s| -|e2e/__tests__/jest.config.ts.test.ts|5✔️|||14s| -|[e2e/__tests__/jestChangedFiles.test.ts](#r0s75)|9✔️|1❌||9s| -|e2e/__tests__/jestEnvironmentJsdom.test.ts|1✔️|||2s| -|e2e/__tests__/jestRequireActual.test.ts|1✔️|||2s| -|e2e/__tests__/jestRequireMock.test.ts|1✔️|||2s| -|e2e/__tests__/json.test.ts|2✔️|||29ms| -|e2e/__tests__/jsonReporter.test.ts|2✔️|||2s| -|e2e/__tests__/lifecycles.ts|1✔️|||861ms| -|e2e/__tests__/listTests.test.ts|2✔️|||945ms| -|e2e/__tests__/locationInResults.test.ts|2✔️|||2s| -|e2e/__tests__/logHeapUsage.test.ts|1✔️|||884ms| -|e2e/__tests__/mockNames.test.ts|8✔️|||7s| -|e2e/__tests__/modernFakeTimers.test.ts|2✔️|||2s| -|e2e/__tests__/moduleNameMapper.test.ts|5✔️|||5s| -|e2e/__tests__/moduleParentNullInTest.ts|1✔️|||886ms| -|e2e/__tests__/multiProjectRunner.test.ts|14✔️|||16s| -|e2e/__tests__/nativeAsyncMock.test.ts|1✔️|||55ms| -|e2e/__tests__/nativeEsm.test.ts|2✔️||1✖️|905ms| -|e2e/__tests__/nativeEsmTypescript.test.ts|1✔️|||956ms| -|e2e/__tests__/nestedEventLoop.test.ts|1✔️|||1s| -|e2e/__tests__/nestedTestDefinitions.test.ts|4✔️|||5s| -|e2e/__tests__/nodePath.test.ts|1✔️|||866ms| -|e2e/__tests__/noTestFound.test.ts|2✔️|||1s| -|e2e/__tests__/noTestsFound.test.ts|5✔️|||3s| -|[e2e/__tests__/onlyChanged.test.ts](#r0s98)|8✔️|1❌||22s| -|e2e/__tests__/onlyFailuresNonWatch.test.ts|1✔️|||3s| -|e2e/__tests__/overrideGlobals.test.ts|2✔️|||2s| -|e2e/__tests__/pnp.test.ts|1✔️|||3s| -|e2e/__tests__/presets.test.ts|2✔️|||2s| -|e2e/__tests__/processExit.test.ts|1✔️|||1s| -|e2e/__tests__/promiseReject.test.ts|1✔️|||967ms| -|e2e/__tests__/regexCharInPath.test.ts|1✔️|||962ms| -|e2e/__tests__/requireAfterTeardown.test.ts|1✔️|||921ms| -|e2e/__tests__/requireMain.test.ts|1✔️|||1s| -|e2e/__tests__/requireMainAfterCreateRequire.test.ts|1✔️|||966ms| -|e2e/__tests__/requireMainIsolateModules.test.ts|1✔️|||976ms| -|e2e/__tests__/requireMainResetModules.test.ts|2✔️|||2s| -|e2e/__tests__/requireV8Module.test.ts|1✔️|||30ms| -|e2e/__tests__/resetModules.test.ts|1✔️|||926ms| -|e2e/__tests__/resolve.test.ts|1✔️|||2s| -|e2e/__tests__/resolveGetPaths.test.ts|1✔️|||1s| -|e2e/__tests__/resolveNodeModule.test.ts|1✔️|||943ms| -|e2e/__tests__/resolveNoFileExtensions.test.ts|2✔️|||1s| -|e2e/__tests__/resolveWithPaths.test.ts|1✔️|||1s| -|e2e/__tests__/runProgrammatically.test.ts|2✔️|||575ms| -|e2e/__tests__/runTestsByPath.test.ts|1✔️|||2s| -|e2e/__tests__/runtimeInternalModuleRegistry.test.ts|1✔️|||1s| -|e2e/__tests__/selectProjects.test.ts|18✔️|||5s| -|e2e/__tests__/setImmediate.test.ts|1✔️|||904ms| -|e2e/__tests__/setupFilesAfterEnvConfig.test.ts|2✔️|||2s| -|e2e/__tests__/showConfig.test.ts|1✔️|||195ms| -|e2e/__tests__/skipBeforeAfterAll.test.ts|1✔️|||1s| -|e2e/__tests__/snapshot-unknown.test.ts|1✔️|||838ms| -|e2e/__tests__/snapshot.test.ts|9✔️|||14s| -|e2e/__tests__/snapshotMockFs.test.ts|1✔️|||883ms| -|e2e/__tests__/snapshotResolver.test.ts|1✔️|||823ms| -|e2e/__tests__/snapshotSerializers.test.ts|2✔️|||2s| -|e2e/__tests__/stackTrace.test.ts|7✔️|||5s| -|e2e/__tests__/stackTraceNoCaptureStackTrace.test.ts|1✔️|||899ms| -|e2e/__tests__/stackTraceSourceMaps.test.ts|1✔️|||2s| -|e2e/__tests__/stackTraceSourceMapsWithCoverage.test.ts|1✔️|||2s| -|e2e/__tests__/supportsDashedArgs.ts|2✔️|||968ms| -|e2e/__tests__/symbol.test.ts|1✔️|||49ms| -|e2e/__tests__/testEnvironment.test.ts|1✔️|||2s| -|e2e/__tests__/testEnvironmentAsync.test.ts|1✔️|||1s| -|e2e/__tests__/testEnvironmentCircus.test.ts|1✔️|||2s| -|e2e/__tests__/testEnvironmentCircusAsync.test.ts|1✔️|||2s| -|e2e/__tests__/testFailureExitCode.test.ts|2✔️|||4s| -|e2e/__tests__/testInRoot.test.ts|1✔️|||1s| -|e2e/__tests__/testNamePattern.test.ts|1✔️|||859ms| -|e2e/__tests__/testNamePatternSkipped.test.ts|1✔️|||991ms| -|e2e/__tests__/testPathPatternReporterMessage.test.ts|1✔️|||3s| -|e2e/__tests__/testResultsProcessor.test.ts|1✔️|||910ms| -|e2e/__tests__/testRetries.test.ts|4✔️|||3s| -|e2e/__tests__/testTodo.test.ts|5✔️|||4s| -|e2e/__tests__/timeouts.test.ts|4✔️|||4s| -|e2e/__tests__/timeoutsLegacy.test.ts|1✔️||3✖️|71ms| -|e2e/__tests__/timerResetMocks.test.ts|2✔️|||2s| -|e2e/__tests__/timerUseRealTimers.test.ts|1✔️|||1s| -|e2e/__tests__/toMatchInlineSnapshot.test.ts|12✔️|||24s| -|e2e/__tests__/toMatchInlineSnapshotWithRetries.test.ts|3✔️|||5s| -|e2e/__tests__/toMatchSnapshot.test.ts|9✔️|||17s| -|e2e/__tests__/toMatchSnapshotWithRetries.test.ts|2✔️|||4s| -|e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts|3✔️|||4s| -|e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts|4✔️|||4s| -|e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts|5✔️|||4s| -|e2e/__tests__/transform.test.ts|16✔️|||27s| -|e2e/__tests__/transformLinkedModules.test.ts|1✔️|||783ms| -|e2e/__tests__/typescriptCoverage.test.ts|1✔️|||3s| -|e2e/__tests__/unexpectedToken.test.ts|3✔️|||3s| -|e2e/__tests__/useStderr.test.ts|1✔️|||1s| -|e2e/__tests__/v8Coverage.test.ts|2✔️|||2s| -|e2e/__tests__/verbose.test.ts|1✔️|||683ms| -|e2e/__tests__/version.test.ts|1✔️|||138ms| -|e2e/__tests__/watchModeNoAccess.test.ts|1✔️|||4s| -|e2e/__tests__/watchModeOnlyFailed.test.ts|1✔️|||1s| -|e2e/__tests__/watchModePatterns.test.ts|2✔️|||4s| -|e2e/__tests__/watchModeUpdateSnapshot.test.ts|1✔️|||1s| -|e2e/__tests__/workerForceExit.test.ts|2✔️|||5s| -|e2e/__tests__/wrongEnv.test.ts|5✔️|||4s| -|e2e/custom-test-sequencer/a.test.js|1✔️|||29ms| -|e2e/custom-test-sequencer/b.test.js|1✔️|||21ms| -|e2e/custom-test-sequencer/c.test.js|1✔️|||42ms| -|e2e/custom-test-sequencer/d.test.js|1✔️|||21ms| -|e2e/custom-test-sequencer/e.test.js|1✔️|||27ms| -|e2e/test-in-root/spec.js|1✔️|||19ms| -|e2e/test-in-root/test.js|1✔️|||37ms| -|e2e/timer-reset-mocks/after-reset-all-mocks/timerAndMock.test.js|2✔️|||30ms| -|e2e/timer-reset-mocks/with-reset-mocks/timerWithMock.test.js|1✔️|||34ms| -|e2e/v8-coverage/empty-sourcemap/test.ts|1✔️|||31ms| -|examples/angular/app.component.spec.ts|3✔️|||654ms| -|examples/angular/shared/data.service.spec.ts|2✔️|||431ms| -|examples/angular/shared/sub.service.spec.ts|1✔️|||109ms| -|examples/async/__tests__/user.test.js|8✔️|||96ms| -|examples/automatic-mocks/__tests__/automock.test.js|2✔️|||74ms| -|examples/automatic-mocks/__tests__/createMockFromModule.test.js|2✔️|||115ms| -|examples/automatic-mocks/__tests__/disableAutomocking.test.js|1✔️|||24ms| -|examples/enzyme/__tests__/CheckboxWithLabel-test.js|1✔️|||434ms| -|examples/getting-started/sum.test.js|1✔️|||78ms| -|examples/jquery/__tests__/display_user.test.js|1✔️|||196ms| -|examples/jquery/__tests__/fetch_current_user.test.js|2✔️|||196ms| -|examples/manual-mocks/__tests__/file_summarizer.test.js|1✔️|||87ms| -|examples/manual-mocks/__tests__/lodashMocking.test.js|1✔️|||109ms| -|examples/manual-mocks/__tests__/user.test.js|1✔️|||41ms| -|examples/manual-mocks/__tests__/userMocked.test.js|1✔️|||105ms| -|examples/module-mock/__tests__/full_mock.js|1✔️|||60ms| -|examples/module-mock/__tests__/mock_per_test.js|2✔️|||116ms| -|examples/module-mock/__tests__/partial_mock.js|1✔️|||215ms| -|examples/mongodb/__test__/db.test.js|1✔️|||236ms| -|examples/react-native/__tests__/intro.test.js|4✔️|||9s| -|examples/react-testing-library/__tests__/CheckboxWithLabel-test.js|1✔️|||469ms| -|examples/react/__tests__/CheckboxWithLabel-test.js|1✔️|||256ms| -|examples/snapshot/__tests__/clock.react.test.js|1✔️|||62ms| -|examples/snapshot/__tests__/link.react.test.js|4✔️|||181ms| -|examples/timer/__tests__/infinite_timer_game.test.js|1✔️|||94ms| -|examples/timer/__tests__/timer_game.test.js|3✔️|||74ms| -|examples/typescript/__tests__/calc.test.ts|6✔️|||276ms| -|examples/typescript/__tests__/CheckboxWithLabel-test.tsx|1✔️|||227ms| -|examples/typescript/__tests__/sub-test.ts|1✔️|||43ms| -|examples/typescript/__tests__/sum-test.ts|2✔️|||69ms| -|examples/typescript/__tests__/sum.test.js|2✔️|||100ms| -|packages/babel-jest/src/__tests__/index.ts|6✔️|||371ms| -|packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts|4✔️|||347ms| -|packages/diff-sequences/src/__tests__/index.property.test.ts|7✔️|||357ms| -|packages/diff-sequences/src/__tests__/index.test.ts|48✔️|||195ms| -|packages/expect/src/__tests__/assertionCounts.test.ts|6✔️|||60ms| -|packages/expect/src/__tests__/asymmetricMatchers.test.ts|38✔️|||207ms| -|packages/expect/src/__tests__/extend.test.ts|10✔️|||99ms| -|packages/expect/src/__tests__/isError.test.ts|4✔️|||43ms| -|packages/expect/src/__tests__/matchers-toContain.property.test.ts|2✔️|||236ms| -|packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts|2✔️|||287ms| -|packages/expect/src/__tests__/matchers-toEqual.property.test.ts|2✔️|||1s| -|packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts|3✔️|||394ms| -|packages/expect/src/__tests__/matchers.test.js|592✔️|||862ms| -|packages/expect/src/__tests__/spyMatchers.test.ts|248✔️|||395ms| -|packages/expect/src/__tests__/stacktrace.test.ts|3✔️|||69ms| -|packages/expect/src/__tests__/symbolInObjects.test.ts|3✔️|||33ms| -|packages/expect/src/__tests__/toEqual-dom.test.ts|12✔️|||99ms| -|packages/expect/src/__tests__/toThrowMatchers.test.ts|98✔️|||257ms| -|packages/expect/src/__tests__/utils.test.ts|41✔️|||147ms| -|packages/jest-circus/src/__tests__/afterAll.test.ts|6✔️|||6s| -|packages/jest-circus/src/__tests__/baseTest.test.ts|2✔️|||3s| -|packages/jest-circus/src/__tests__/circusItTestError.test.ts|8✔️|||300ms| -|packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts|3✔️|||81ms| -|packages/jest-circus/src/__tests__/hooks.test.ts|3✔️|||4s| -|packages/jest-circus/src/__tests__/hooksError.test.ts|32✔️|||127ms| -|packages/jest-cli/src/__tests__/cli/args.test.ts|17✔️|||345ms| -|packages/jest-cli/src/init/__tests__/init.test.js|24✔️|||119ms| -|packages/jest-cli/src/init/__tests__/modifyPackageJson.test.ts|4✔️|||30ms| -|packages/jest-config/src/__tests__/Defaults.test.ts|1✔️|||672ms| -|packages/jest-config/src/__tests__/getMaxWorkers.test.ts|7✔️|||67ms| -|packages/jest-config/src/__tests__/normalize.test.js|118✔️|||798ms| -|packages/jest-config/src/__tests__/readConfig.test.ts|1✔️|||76ms| -|packages/jest-config/src/__tests__/readConfigs.test.ts|3✔️|||135ms| -|packages/jest-config/src/__tests__/resolveConfigPath.test.ts|10✔️|||183ms| -|packages/jest-config/src/__tests__/setFromArgv.test.ts|4✔️|||53ms| -|packages/jest-config/src/__tests__/validatePattern.test.ts|4✔️|||52ms| -|packages/jest-console/src/__tests__/bufferedConsole.test.ts|20✔️|||171ms| -|packages/jest-console/src/__tests__/CustomConsole.test.ts|23✔️|||115ms| -|packages/jest-console/src/__tests__/getConsoleOutput.test.ts|12✔️|||56ms| -|packages/jest-core/src/__tests__/FailedTestsCache.test.js|1✔️|||25ms| -|packages/jest-core/src/__tests__/getNoTestsFoundMessage.test.js|5✔️|||61ms| -|packages/jest-core/src/__tests__/globals.test.ts|1✔️|||22ms| -|packages/jest-core/src/__tests__/runJest.test.js|2✔️|||261ms| -|packages/jest-core/src/__tests__/SearchSource.test.ts|27✔️|||3s| -|packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js|13✔️|||89ms| -|packages/jest-core/src/__tests__/TestScheduler.test.js|8✔️|||520ms| -|packages/jest-core/src/__tests__/testSchedulerHelper.test.js|12✔️|||48ms| -|packages/jest-core/src/__tests__/watch.test.js|80✔️|||7s| -|packages/jest-core/src/__tests__/watchFileChanges.test.ts|1✔️|||2s| -|packages/jest-core/src/__tests__/watchFilenamePatternMode.test.js|2✔️|||165ms| -|packages/jest-core/src/__tests__/watchTestNamePatternMode.test.js|1✔️|||246ms| -|packages/jest-core/src/lib/__tests__/isValidPath.test.ts|3✔️|||166ms| -|packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts|3✔️|||48ms| -|packages/jest-create-cache-key-function/src/__tests__/index.test.ts|1✔️|||75ms| -|packages/jest-diff/src/__tests__/diff.test.ts|107✔️|||625ms| -|packages/jest-diff/src/__tests__/diffStringsRaw.test.ts|2✔️|||55ms| -|packages/jest-diff/src/__tests__/getAlignedDiffs.test.ts|24✔️|||72ms| -|packages/jest-diff/src/__tests__/joinAlignedDiffs.test.ts|6✔️|||44ms| -|packages/jest-docblock/src/__tests__/index.test.ts|36✔️|||177ms| -|packages/jest-each/src/__tests__/array.test.ts|159✔️|||192ms| -|packages/jest-each/src/__tests__/index.test.ts|10✔️|||44ms| -|packages/jest-each/src/__tests__/template.test.ts|242✔️|||483ms| -|packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts|2✔️|||783ms| -|packages/jest-environment-node/src/__tests__/node_environment.test.ts|6✔️|||184ms| -|packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts|50✔️|||302ms| -|packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts|40✔️|||317ms| -|packages/jest-get-type/src/__tests__/getType.test.ts|14✔️|||45ms| -|packages/jest-get-type/src/__tests__/isPrimitive.test.ts|18✔️|||36ms| -|packages/jest-globals/src/__tests__/index.ts|1✔️|||533ms| -|packages/jest-haste-map/src/__tests__/get_mock_name.test.js|1✔️|||22ms| -|packages/jest-haste-map/src/__tests__/includes_dotfiles.test.ts|1✔️|||337ms| -|packages/jest-haste-map/src/__tests__/index.test.js|44✔️|||1s| -|packages/jest-haste-map/src/__tests__/worker.test.js|7✔️|||100ms| -|packages/jest-haste-map/src/crawlers/__tests__/node.test.js|10✔️|||170ms| -|packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js|8✔️|||153ms| -|packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js|15✔️|||56ms| -|packages/jest-haste-map/src/lib/__tests__/fast_path.test.js|5✔️|||29ms| -|packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js|1✔️|||35ms| -|packages/jest-haste-map/src/lib/__tests__/isRegExpSupported.test.js|2✔️|||31ms| -|packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js|2✔️|||35ms| -|packages/jest-jasmine2/src/__tests__/concurrent.test.ts|3✔️|||24ms| -|packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts|7✔️|||70ms| -|packages/jest-jasmine2/src/__tests__/hooksError.test.ts|32✔️|||51ms| -|packages/jest-jasmine2/src/__tests__/iterators.test.ts|4✔️|||43ms| -|packages/jest-jasmine2/src/__tests__/itTestError.test.ts|6✔️|||32ms| -|packages/jest-jasmine2/src/__tests__/itToTestAlias.test.ts|1✔️|||23ms| -|packages/jest-jasmine2/src/__tests__/pTimeout.test.ts|3✔️|||44ms| -|packages/jest-jasmine2/src/__tests__/queueRunner.test.ts|6✔️|||93ms| -|packages/jest-jasmine2/src/__tests__/reporter.test.ts|1✔️|||107ms| -|packages/jest-jasmine2/src/__tests__/Suite.test.ts|1✔️|||84ms| -|packages/jest-jasmine2/src/__tests__/todoError.test.ts|3✔️|||27ms| -|packages/jest-leak-detector/src/__tests__/index.test.ts|6✔️|||986ms| -|packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts|11✔️|||49ms| -|packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceableDom.test.ts|2✔️|||48ms| -|packages/jest-matcher-utils/src/__tests__/index.test.ts|48✔️|||391ms| -|packages/jest-matcher-utils/src/__tests__/printDiffOrStringify.test.ts|21✔️|||114ms| -|packages/jest-matcher-utils/src/__tests__/Replaceable.test.ts|17✔️|||111ms| -|packages/jest-message-util/src/__tests__/messages.test.ts|11✔️|||205ms| -|packages/jest-mock/src/__tests__/index.test.ts|84✔️|||509ms| -|packages/jest-regex-util/src/__tests__/index.test.ts|8✔️|||56ms| -|packages/jest-repl/src/__tests__/jest_repl.test.js|1✔️|||1s| -|packages/jest-repl/src/__tests__/runtime_cli.test.js|4✔️|||4s| -|packages/jest-reporters/src/__tests__/CoverageReporter.test.js|12✔️|||397ms| -|packages/jest-reporters/src/__tests__/CoverageWorker.test.js|2✔️|||199ms| -|packages/jest-reporters/src/__tests__/DefaultReporter.test.js|2✔️|||148ms| -|packages/jest-reporters/src/__tests__/generateEmptyCoverage.test.js|3✔️|||1s| -|packages/jest-reporters/src/__tests__/getResultHeader.test.js|4✔️|||30ms| -|packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js|3✔️|||28ms| -|packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js|4✔️|||49ms| -|packages/jest-reporters/src/__tests__/getWatermarks.test.ts|2✔️|||37ms| -|packages/jest-reporters/src/__tests__/NotifyReporter.test.ts|18✔️|||166ms| -|packages/jest-reporters/src/__tests__/SummaryReporter.test.js|4✔️|||366ms| -|packages/jest-reporters/src/__tests__/utils.test.ts|10✔️|||85ms| -|packages/jest-reporters/src/__tests__/VerboseReporter.test.js|11✔️|||425ms| -|packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts|11✔️|||666ms| -|packages/jest-resolve/src/__tests__/isBuiltinModule.test.ts|4✔️|||36ms| -|packages/jest-resolve/src/__tests__/resolve.test.ts|16✔️|||1s| -|packages/jest-runner/src/__tests__/testRunner.test.ts|2✔️|||905ms| -|packages/jest-runtime/src/__tests__/instrumentation.test.ts|1✔️|||275ms| -|packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js|3✔️|||606ms| -|packages/jest-runtime/src/__tests__/runtime_environment.test.js|2✔️|||497ms| -|packages/jest-runtime/src/__tests__/runtime_internal_module.test.js|4✔️|||727ms| -|packages/jest-runtime/src/__tests__/runtime_jest_fn.js|4✔️|||479ms| -|packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js|2✔️|||521ms| -|packages/jest-runtime/src/__tests__/runtime_mock.test.js|4✔️|||743ms| -|packages/jest-runtime/src/__tests__/runtime_module_directories.test.js|4✔️|||525ms| -|packages/jest-runtime/src/__tests__/runtime_node_path.test.js|4✔️|||1s| -|packages/jest-runtime/src/__tests__/runtime_require_actual.test.js|2✔️|||478ms| -|packages/jest-runtime/src/__tests__/runtime_require_cache.test.js|2✔️|||454ms| -|packages/jest-runtime/src/__tests__/runtime_require_mock.test.js|13✔️|||962ms| -|packages/jest-runtime/src/__tests__/runtime_require_module_no_ext.test.js|1✔️|||261ms| -|packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js|6✔️|||2s| -|packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js|17✔️|||1s| -|packages/jest-runtime/src/__tests__/runtime_require_module.test.js|27✔️|||2s| -|packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts|5✔️|||707ms| -|packages/jest-runtime/src/__tests__/runtime_wrap.js|2✔️|||263ms| -|packages/jest-runtime/src/__tests__/Runtime-sourceMaps.test.js|1✔️|||584ms| -|packages/jest-runtime/src/__tests__/Runtime-statics.test.js|2✔️|||162ms| -|packages/jest-serializer/src/__tests__/index.test.ts|17✔️|||158ms| -|packages/jest-snapshot/src/__tests__/dedentLines.test.ts|17✔️|||94ms| -|packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts|22✔️|||1s| -|packages/jest-snapshot/src/__tests__/matcher.test.ts|1✔️|||131ms| -|packages/jest-snapshot/src/__tests__/mockSerializer.test.ts|10✔️|||45ms| -|packages/jest-snapshot/src/__tests__/printSnapshot.test.ts|71✔️|||1s| -|packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts|10✔️|||98ms| -|packages/jest-snapshot/src/__tests__/throwMatcher.test.ts|3✔️|||481ms| -|packages/jest-snapshot/src/__tests__/utils.test.ts|26✔️|||214ms| -|packages/jest-source-map/src/__tests__/getCallsite.test.ts|3✔️|||86ms| -|packages/jest-test-result/src/__tests__/formatTestResults.test.ts|1✔️|||53ms| -|packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js|8✔️|||251ms| -|packages/jest-transform/src/__tests__/ScriptTransformer.test.ts|22✔️|||2s| -|packages/jest-transform/src/__tests__/shouldInstrument.test.ts|25✔️|||155ms| -|packages/jest-util/src/__tests__/createProcessObject.test.ts|4✔️|||81ms| -|packages/jest-util/src/__tests__/deepCyclicCopy.test.ts|12✔️|||86ms| -|packages/jest-util/src/__tests__/errorWithStack.test.ts|1✔️|||41ms| -|packages/jest-util/src/__tests__/formatTime.test.ts|11✔️|||82ms| -|packages/jest-util/src/__tests__/globsToMatcher.test.ts|4✔️|||56ms| -|packages/jest-util/src/__tests__/installCommonGlobals.test.ts|2✔️|||68ms| -|packages/jest-util/src/__tests__/isInteractive.test.ts|2✔️|||35ms| -|packages/jest-util/src/__tests__/isPromise.test.ts|10✔️|||30ms| -|packages/jest-validate/src/__tests__/validate.test.ts|23✔️|||283ms| -|packages/jest-validate/src/__tests__/validateCLIOptions.test.js|6✔️|||83ms| -|packages/jest-watcher/src/lib/__tests__/formatTestNameByPattern.test.ts|11✔️|||129ms| -|packages/jest-watcher/src/lib/__tests__/prompt.test.ts|3✔️|||91ms| -|packages/jest-watcher/src/lib/__tests__/scroll.test.ts|5✔️|||57ms| -|packages/jest-worker/src/__tests__/Farm.test.js|10✔️|||158ms| -|packages/jest-worker/src/__tests__/FifoQueue.test.js|3✔️|||48ms| -|packages/jest-worker/src/__tests__/index.test.js|8✔️|||230ms| -|packages/jest-worker/src/__tests__/PriorityQueue.test.js|5✔️|||63ms| -|packages/jest-worker/src/__tests__/process-integration.test.js|5✔️|||62ms| -|packages/jest-worker/src/__tests__/thread-integration.test.js|6✔️|||114ms| -|packages/jest-worker/src/__tests__/WorkerPool.test.js|3✔️|||51ms| -|packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.js|11✔️|||653ms| -|packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.js|17✔️|||184ms| -|packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js|15✔️|||258ms| -|packages/jest-worker/src/workers/__tests__/processChild.test.js|10✔️|||135ms| -|packages/jest-worker/src/workers/__tests__/threadChild.test.js|10✔️|||120ms| -|packages/pretty-format/src/__tests__/AsymmetricMatcher.test.ts|38✔️|||137ms| -|packages/pretty-format/src/__tests__/ConvertAnsi.test.ts|6✔️|||43ms| -|packages/pretty-format/src/__tests__/DOMCollection.test.ts|10✔️|||64ms| -|packages/pretty-format/src/__tests__/DOMElement.test.ts|28✔️|||148ms| -|packages/pretty-format/src/__tests__/Immutable.test.ts|111✔️|||443ms| -|packages/pretty-format/src/__tests__/prettyFormat.test.ts|86✔️|||219ms| -|packages/pretty-format/src/__tests__/react.test.tsx|55✔️|||325ms| -|packages/pretty-format/src/__tests__/ReactElement.test.ts|3✔️|||64ms| -### ❌ e2e/__tests__/jestChangedFiles.test.ts +|[e2e/__tests__/asyncAndCallback.test.ts](#user-content-r0s0)|1 ✅|||746ms| +|[e2e/__tests__/asyncRegenerator.test.ts](#user-content-r0s1)|1 ✅|||4s| +|[e2e/__tests__/autoClearMocks.test.ts](#user-content-r0s2)|2 ✅|||2s| +|[e2e/__tests__/autoResetMocks.test.ts](#user-content-r0s3)|2 ✅|||2s| +|[e2e/__tests__/autoRestoreMocks.test.ts](#user-content-r0s4)|2 ✅|||2s| +|[e2e/__tests__/babelPluginJestHoist.test.ts](#user-content-r0s5)|1 ✅|||6s| +|[e2e/__tests__/badSourceMap.test.ts](#user-content-r0s6)|1 ✅|||858ms| +|[e2e/__tests__/beforeAllFiltered.ts](#user-content-r0s7)|1 ✅|||958ms| +|[e2e/__tests__/beforeEachQueue.ts](#user-content-r0s8)|1 ✅||1 ⚪|55ms| +|[e2e/__tests__/callDoneTwice.test.ts](#user-content-r0s9)|1 ✅|||882ms| +|[e2e/__tests__/chaiAssertionLibrary.ts](#user-content-r0s10)|1 ✅|||2s| +|[e2e/__tests__/circularInequality.test.ts](#user-content-r0s11)|1 ✅|||1s| +|[e2e/__tests__/circusConcurrentEach.test.ts](#user-content-r0s12)|2 ✅|||2s| +|[e2e/__tests__/circusDeclarationErrors.test.ts](#user-content-r0s13)|1 ✅|||869ms| +|[e2e/__tests__/clearCache.test.ts](#user-content-r0s14)|2 ✅|||1s| +|[e2e/__tests__/cliHandlesExactFilenames.test.ts](#user-content-r0s15)|2 ✅|||1s| +|[e2e/__tests__/compareDomNodes.test.ts](#user-content-r0s16)|1 ✅|||1s| +|[e2e/__tests__/config.test.ts](#user-content-r0s17)|6 ✅|||4s| +|[e2e/__tests__/console.test.ts](#user-content-r0s18)|7 ✅|||8s| +|[e2e/__tests__/consoleAfterTeardown.test.ts](#user-content-r0s19)|1 ✅|||1s| +|[e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts](#user-content-r0s20)|1 ✅|||793ms| +|[e2e/__tests__/coverageHandlebars.test.ts](#user-content-r0s21)|1 ✅|||2s| +|[e2e/__tests__/coverageRemapping.test.ts](#user-content-r0s22)|1 ✅|||13s| +|[e2e/__tests__/coverageReport.test.ts](#user-content-r0s23)|12 ✅|||22s| +|[e2e/__tests__/coverageThreshold.test.ts](#user-content-r0s24)|5 ✅|||5s| +|[e2e/__tests__/coverageTransformInstrumented.test.ts](#user-content-r0s25)|1 ✅|||5s| +|[e2e/__tests__/coverageWithoutTransform.test.ts](#user-content-r0s26)|1 ✅|||1s| +|[e2e/__tests__/createProcessObject.test.ts](#user-content-r0s27)|1 ✅|||908ms| +|[e2e/__tests__/customInlineSnapshotMatchers.test.ts](#user-content-r0s28)|1 ✅|||2s| +|[e2e/__tests__/customMatcherStackTrace.test.ts](#user-content-r0s29)|2 ✅|||2s| +|[e2e/__tests__/customReporters.test.ts](#user-content-r0s30)|9 ✅|||7s| +|[e2e/__tests__/customResolver.test.ts](#user-content-r0s31)|1 ✅|||826ms| +|[e2e/__tests__/customTestSequencers.test.ts](#user-content-r0s32)|3 ✅|||3s| +|[e2e/__tests__/debug.test.ts](#user-content-r0s33)|1 ✅|||899ms| +|[e2e/__tests__/declarationErrors.test.ts](#user-content-r0s34)|3 ✅|||2s| +|[e2e/__tests__/dependencyClash.test.ts](#user-content-r0s35)|1 ✅|||833ms| +|[e2e/__tests__/detectOpenHandles.ts](#user-content-r0s36)|8 ✅|||8s| +|[e2e/__tests__/domDiffing.test.ts](#user-content-r0s37)|1 ✅|||1s| +|[e2e/__tests__/doneInHooks.test.ts](#user-content-r0s38)|1 ✅|||855ms| +|[e2e/__tests__/dynamicRequireDependencies.ts](#user-content-r0s39)|1 ✅|||847ms| +|[e2e/__tests__/each.test.ts](#user-content-r0s40)|7 ✅|||5s| +|[e2e/__tests__/emptyDescribeWithHooks.test.ts](#user-content-r0s41)|4 ✅|||3s| +|[e2e/__tests__/emptySuiteError.test.ts](#user-content-r0s42)|1 ✅|||885ms| +|[e2e/__tests__/env.test.ts](#user-content-r0s43)|6 ✅|||5s| +|[e2e/__tests__/environmentAfterTeardown.test.ts](#user-content-r0s44)|1 ✅|||892ms| +|[e2e/__tests__/errorOnDeprecated.test.ts](#user-content-r0s45)|1 ✅||24 ⚪|56ms| +|[e2e/__tests__/esmConfigFile.test.ts](#user-content-r0s46)|3 ✅|||526ms| +|[e2e/__tests__/executeTestsOnceInMpr.ts](#user-content-r0s47)|1 ✅|||976ms| +|[e2e/__tests__/existentRoots.test.ts](#user-content-r0s48)|4 ✅|||627ms| +|[e2e/__tests__/expectAsyncMatcher.test.ts](#user-content-r0s49)|2 ✅|||3s| +|[e2e/__tests__/expectInVm.test.ts](#user-content-r0s50)|1 ✅|||2s| +|[e2e/__tests__/extraGlobals.test.ts](#user-content-r0s51)|1 ✅|||1s| +|[e2e/__tests__/failureDetailsProperty.test.ts](#user-content-r0s52)|1 ✅|||907ms| +|[e2e/__tests__/failures.test.ts](#user-content-r0s53)|7 ✅|||10s| +|[e2e/__tests__/fakePromises.test.ts](#user-content-r0s54)|2 ✅|||2s| +|[e2e/__tests__/fatalWorkerError.test.ts](#user-content-r0s55)|1 ✅|||3s| +|[e2e/__tests__/filter.test.ts](#user-content-r0s56)|7 ✅|||5s| +|[e2e/__tests__/findRelatedFiles.test.ts](#user-content-r0s57)|5 ✅|||6s| +|[e2e/__tests__/focusedTests.test.ts](#user-content-r0s58)|1 ✅|||888ms| +|[e2e/__tests__/forceExit.test.ts](#user-content-r0s59)|1 ✅|||2s| +|[e2e/__tests__/generatorMock.test.ts](#user-content-r0s60)|1 ✅|||1s| +|[e2e/__tests__/global-mutation.test.ts](#user-content-r0s61)|1 ✅|||40ms| +|[e2e/__tests__/global.test.ts](#user-content-r0s62)|1 ✅|||31ms| +|[e2e/__tests__/globals.test.ts](#user-content-r0s63)|10 ✅|||8s| +|[e2e/__tests__/globalSetup.test.ts](#user-content-r0s64)|10 ✅|||14s| +|[e2e/__tests__/globalTeardown.test.ts](#user-content-r0s65)|7 ✅|||12s| +|[e2e/__tests__/hasteMapMockChanged.test.ts](#user-content-r0s66)|1 ✅|||379ms| +|[e2e/__tests__/hasteMapSha1.test.ts](#user-content-r0s67)|1 ✅|||298ms| +|[e2e/__tests__/hasteMapSize.test.ts](#user-content-r0s68)|2 ✅|||397ms| +|[e2e/__tests__/importedGlobals.test.ts](#user-content-r0s69)|1 ✅|||1s| +|[e2e/__tests__/injectGlobals.test.ts](#user-content-r0s70)|2 ✅|||2s| +|[e2e/__tests__/jasmineAsync.test.ts](#user-content-r0s71)|15 ✅|||28s| +|[e2e/__tests__/jasmineAsyncWithPendingDuringTest.ts](#user-content-r0s72)|1 ✅||1 ⚪|72ms| +|[e2e/__tests__/jest.config.js.test.ts](#user-content-r0s73)|3 ✅|||2s| +|[e2e/__tests__/jest.config.ts.test.ts](#user-content-r0s74)|5 ✅|||14s| +|[e2e/__tests__/jestChangedFiles.test.ts](#user-content-r0s75)|9 ✅|1 ❌||9s| +|[e2e/__tests__/jestEnvironmentJsdom.test.ts](#user-content-r0s76)|1 ✅|||2s| +|[e2e/__tests__/jestRequireActual.test.ts](#user-content-r0s77)|1 ✅|||2s| +|[e2e/__tests__/jestRequireMock.test.ts](#user-content-r0s78)|1 ✅|||2s| +|[e2e/__tests__/json.test.ts](#user-content-r0s79)|2 ✅|||29ms| +|[e2e/__tests__/jsonReporter.test.ts](#user-content-r0s80)|2 ✅|||2s| +|[e2e/__tests__/lifecycles.ts](#user-content-r0s81)|1 ✅|||861ms| +|[e2e/__tests__/listTests.test.ts](#user-content-r0s82)|2 ✅|||945ms| +|[e2e/__tests__/locationInResults.test.ts](#user-content-r0s83)|2 ✅|||2s| +|[e2e/__tests__/logHeapUsage.test.ts](#user-content-r0s84)|1 ✅|||884ms| +|[e2e/__tests__/mockNames.test.ts](#user-content-r0s85)|8 ✅|||7s| +|[e2e/__tests__/modernFakeTimers.test.ts](#user-content-r0s86)|2 ✅|||2s| +|[e2e/__tests__/moduleNameMapper.test.ts](#user-content-r0s87)|5 ✅|||5s| +|[e2e/__tests__/moduleParentNullInTest.ts](#user-content-r0s88)|1 ✅|||886ms| +|[e2e/__tests__/multiProjectRunner.test.ts](#user-content-r0s89)|14 ✅|||16s| +|[e2e/__tests__/nativeAsyncMock.test.ts](#user-content-r0s90)|1 ✅|||55ms| +|[e2e/__tests__/nativeEsm.test.ts](#user-content-r0s91)|2 ✅||1 ⚪|905ms| +|[e2e/__tests__/nativeEsmTypescript.test.ts](#user-content-r0s92)|1 ✅|||956ms| +|[e2e/__tests__/nestedEventLoop.test.ts](#user-content-r0s93)|1 ✅|||1s| +|[e2e/__tests__/nestedTestDefinitions.test.ts](#user-content-r0s94)|4 ✅|||5s| +|[e2e/__tests__/nodePath.test.ts](#user-content-r0s95)|1 ✅|||866ms| +|[e2e/__tests__/noTestFound.test.ts](#user-content-r0s96)|2 ✅|||1s| +|[e2e/__tests__/noTestsFound.test.ts](#user-content-r0s97)|5 ✅|||3s| +|[e2e/__tests__/onlyChanged.test.ts](#user-content-r0s98)|8 ✅|1 ❌||22s| +|[e2e/__tests__/onlyFailuresNonWatch.test.ts](#user-content-r0s99)|1 ✅|||3s| +|[e2e/__tests__/overrideGlobals.test.ts](#user-content-r0s100)|2 ✅|||2s| +|[e2e/__tests__/pnp.test.ts](#user-content-r0s101)|1 ✅|||3s| +|[e2e/__tests__/presets.test.ts](#user-content-r0s102)|2 ✅|||2s| +|[e2e/__tests__/processExit.test.ts](#user-content-r0s103)|1 ✅|||1s| +|[e2e/__tests__/promiseReject.test.ts](#user-content-r0s104)|1 ✅|||967ms| +|[e2e/__tests__/regexCharInPath.test.ts](#user-content-r0s105)|1 ✅|||962ms| +|[e2e/__tests__/requireAfterTeardown.test.ts](#user-content-r0s106)|1 ✅|||921ms| +|[e2e/__tests__/requireMain.test.ts](#user-content-r0s107)|1 ✅|||1s| +|[e2e/__tests__/requireMainAfterCreateRequire.test.ts](#user-content-r0s108)|1 ✅|||966ms| +|[e2e/__tests__/requireMainIsolateModules.test.ts](#user-content-r0s109)|1 ✅|||976ms| +|[e2e/__tests__/requireMainResetModules.test.ts](#user-content-r0s110)|2 ✅|||2s| +|[e2e/__tests__/requireV8Module.test.ts](#user-content-r0s111)|1 ✅|||30ms| +|[e2e/__tests__/resetModules.test.ts](#user-content-r0s112)|1 ✅|||926ms| +|[e2e/__tests__/resolve.test.ts](#user-content-r0s113)|1 ✅|||2s| +|[e2e/__tests__/resolveGetPaths.test.ts](#user-content-r0s114)|1 ✅|||1s| +|[e2e/__tests__/resolveNodeModule.test.ts](#user-content-r0s115)|1 ✅|||943ms| +|[e2e/__tests__/resolveNoFileExtensions.test.ts](#user-content-r0s116)|2 ✅|||1s| +|[e2e/__tests__/resolveWithPaths.test.ts](#user-content-r0s117)|1 ✅|||1s| +|[e2e/__tests__/runProgrammatically.test.ts](#user-content-r0s118)|2 ✅|||575ms| +|[e2e/__tests__/runTestsByPath.test.ts](#user-content-r0s119)|1 ✅|||2s| +|[e2e/__tests__/runtimeInternalModuleRegistry.test.ts](#user-content-r0s120)|1 ✅|||1s| +|[e2e/__tests__/selectProjects.test.ts](#user-content-r0s121)|18 ✅|||5s| +|[e2e/__tests__/setImmediate.test.ts](#user-content-r0s122)|1 ✅|||904ms| +|[e2e/__tests__/setupFilesAfterEnvConfig.test.ts](#user-content-r0s123)|2 ✅|||2s| +|[e2e/__tests__/showConfig.test.ts](#user-content-r0s124)|1 ✅|||195ms| +|[e2e/__tests__/skipBeforeAfterAll.test.ts](#user-content-r0s125)|1 ✅|||1s| +|[e2e/__tests__/snapshot-unknown.test.ts](#user-content-r0s126)|1 ✅|||838ms| +|[e2e/__tests__/snapshot.test.ts](#user-content-r0s127)|9 ✅|||14s| +|[e2e/__tests__/snapshotMockFs.test.ts](#user-content-r0s128)|1 ✅|||883ms| +|[e2e/__tests__/snapshotResolver.test.ts](#user-content-r0s129)|1 ✅|||823ms| +|[e2e/__tests__/snapshotSerializers.test.ts](#user-content-r0s130)|2 ✅|||2s| +|[e2e/__tests__/stackTrace.test.ts](#user-content-r0s131)|7 ✅|||5s| +|[e2e/__tests__/stackTraceNoCaptureStackTrace.test.ts](#user-content-r0s132)|1 ✅|||899ms| +|[e2e/__tests__/stackTraceSourceMaps.test.ts](#user-content-r0s133)|1 ✅|||2s| +|[e2e/__tests__/stackTraceSourceMapsWithCoverage.test.ts](#user-content-r0s134)|1 ✅|||2s| +|[e2e/__tests__/supportsDashedArgs.ts](#user-content-r0s135)|2 ✅|||968ms| +|[e2e/__tests__/symbol.test.ts](#user-content-r0s136)|1 ✅|||49ms| +|[e2e/__tests__/testEnvironment.test.ts](#user-content-r0s137)|1 ✅|||2s| +|[e2e/__tests__/testEnvironmentAsync.test.ts](#user-content-r0s138)|1 ✅|||1s| +|[e2e/__tests__/testEnvironmentCircus.test.ts](#user-content-r0s139)|1 ✅|||2s| +|[e2e/__tests__/testEnvironmentCircusAsync.test.ts](#user-content-r0s140)|1 ✅|||2s| +|[e2e/__tests__/testFailureExitCode.test.ts](#user-content-r0s141)|2 ✅|||4s| +|[e2e/__tests__/testInRoot.test.ts](#user-content-r0s142)|1 ✅|||1s| +|[e2e/__tests__/testNamePattern.test.ts](#user-content-r0s143)|1 ✅|||859ms| +|[e2e/__tests__/testNamePatternSkipped.test.ts](#user-content-r0s144)|1 ✅|||991ms| +|[e2e/__tests__/testPathPatternReporterMessage.test.ts](#user-content-r0s145)|1 ✅|||3s| +|[e2e/__tests__/testResultsProcessor.test.ts](#user-content-r0s146)|1 ✅|||910ms| +|[e2e/__tests__/testRetries.test.ts](#user-content-r0s147)|4 ✅|||3s| +|[e2e/__tests__/testTodo.test.ts](#user-content-r0s148)|5 ✅|||4s| +|[e2e/__tests__/timeouts.test.ts](#user-content-r0s149)|4 ✅|||4s| +|[e2e/__tests__/timeoutsLegacy.test.ts](#user-content-r0s150)|1 ✅||3 ⚪|71ms| +|[e2e/__tests__/timerResetMocks.test.ts](#user-content-r0s151)|2 ✅|||2s| +|[e2e/__tests__/timerUseRealTimers.test.ts](#user-content-r0s152)|1 ✅|||1s| +|[e2e/__tests__/toMatchInlineSnapshot.test.ts](#user-content-r0s153)|12 ✅|||24s| +|[e2e/__tests__/toMatchInlineSnapshotWithRetries.test.ts](#user-content-r0s154)|3 ✅|||5s| +|[e2e/__tests__/toMatchSnapshot.test.ts](#user-content-r0s155)|9 ✅|||17s| +|[e2e/__tests__/toMatchSnapshotWithRetries.test.ts](#user-content-r0s156)|2 ✅|||4s| +|[e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts](#user-content-r0s157)|3 ✅|||4s| +|[e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts](#user-content-r0s158)|4 ✅|||4s| +|[e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts](#user-content-r0s159)|5 ✅|||4s| +|[e2e/__tests__/transform.test.ts](#user-content-r0s160)|16 ✅|||27s| +|[e2e/__tests__/transformLinkedModules.test.ts](#user-content-r0s161)|1 ✅|||783ms| +|[e2e/__tests__/typescriptCoverage.test.ts](#user-content-r0s162)|1 ✅|||3s| +|[e2e/__tests__/unexpectedToken.test.ts](#user-content-r0s163)|3 ✅|||3s| +|[e2e/__tests__/useStderr.test.ts](#user-content-r0s164)|1 ✅|||1s| +|[e2e/__tests__/v8Coverage.test.ts](#user-content-r0s165)|2 ✅|||2s| +|[e2e/__tests__/verbose.test.ts](#user-content-r0s166)|1 ✅|||683ms| +|[e2e/__tests__/version.test.ts](#user-content-r0s167)|1 ✅|||138ms| +|[e2e/__tests__/watchModeNoAccess.test.ts](#user-content-r0s168)|1 ✅|||4s| +|[e2e/__tests__/watchModeOnlyFailed.test.ts](#user-content-r0s169)|1 ✅|||1s| +|[e2e/__tests__/watchModePatterns.test.ts](#user-content-r0s170)|2 ✅|||4s| +|[e2e/__tests__/watchModeUpdateSnapshot.test.ts](#user-content-r0s171)|1 ✅|||1s| +|[e2e/__tests__/workerForceExit.test.ts](#user-content-r0s172)|2 ✅|||5s| +|[e2e/__tests__/wrongEnv.test.ts](#user-content-r0s173)|5 ✅|||4s| +|[e2e/custom-test-sequencer/a.test.js](#user-content-r0s174)|1 ✅|||29ms| +|[e2e/custom-test-sequencer/b.test.js](#user-content-r0s175)|1 ✅|||21ms| +|[e2e/custom-test-sequencer/c.test.js](#user-content-r0s176)|1 ✅|||42ms| +|[e2e/custom-test-sequencer/d.test.js](#user-content-r0s177)|1 ✅|||21ms| +|[e2e/custom-test-sequencer/e.test.js](#user-content-r0s178)|1 ✅|||27ms| +|[e2e/test-in-root/spec.js](#user-content-r0s179)|1 ✅|||19ms| +|[e2e/test-in-root/test.js](#user-content-r0s180)|1 ✅|||37ms| +|[e2e/timer-reset-mocks/after-reset-all-mocks/timerAndMock.test.js](#user-content-r0s181)|2 ✅|||30ms| +|[e2e/timer-reset-mocks/with-reset-mocks/timerWithMock.test.js](#user-content-r0s182)|1 ✅|||34ms| +|[e2e/v8-coverage/empty-sourcemap/test.ts](#user-content-r0s183)|1 ✅|||31ms| +|[examples/angular/app.component.spec.ts](#user-content-r0s184)|3 ✅|||654ms| +|[examples/angular/shared/data.service.spec.ts](#user-content-r0s185)|2 ✅|||431ms| +|[examples/angular/shared/sub.service.spec.ts](#user-content-r0s186)|1 ✅|||109ms| +|[examples/async/__tests__/user.test.js](#user-content-r0s187)|8 ✅|||96ms| +|[examples/automatic-mocks/__tests__/automock.test.js](#user-content-r0s188)|2 ✅|||74ms| +|[examples/automatic-mocks/__tests__/createMockFromModule.test.js](#user-content-r0s189)|2 ✅|||115ms| +|[examples/automatic-mocks/__tests__/disableAutomocking.test.js](#user-content-r0s190)|1 ✅|||24ms| +|[examples/enzyme/__tests__/CheckboxWithLabel-test.js](#user-content-r0s191)|1 ✅|||434ms| +|[examples/getting-started/sum.test.js](#user-content-r0s192)|1 ✅|||78ms| +|[examples/jquery/__tests__/display_user.test.js](#user-content-r0s193)|1 ✅|||196ms| +|[examples/jquery/__tests__/fetch_current_user.test.js](#user-content-r0s194)|2 ✅|||196ms| +|[examples/manual-mocks/__tests__/file_summarizer.test.js](#user-content-r0s195)|1 ✅|||87ms| +|[examples/manual-mocks/__tests__/lodashMocking.test.js](#user-content-r0s196)|1 ✅|||109ms| +|[examples/manual-mocks/__tests__/user.test.js](#user-content-r0s197)|1 ✅|||41ms| +|[examples/manual-mocks/__tests__/userMocked.test.js](#user-content-r0s198)|1 ✅|||105ms| +|[examples/module-mock/__tests__/full_mock.js](#user-content-r0s199)|1 ✅|||60ms| +|[examples/module-mock/__tests__/mock_per_test.js](#user-content-r0s200)|2 ✅|||116ms| +|[examples/module-mock/__tests__/partial_mock.js](#user-content-r0s201)|1 ✅|||215ms| +|[examples/mongodb/__test__/db.test.js](#user-content-r0s202)|1 ✅|||236ms| +|[examples/react-native/__tests__/intro.test.js](#user-content-r0s203)|4 ✅|||9s| +|[examples/react-testing-library/__tests__/CheckboxWithLabel-test.js](#user-content-r0s204)|1 ✅|||469ms| +|[examples/react/__tests__/CheckboxWithLabel-test.js](#user-content-r0s205)|1 ✅|||256ms| +|[examples/snapshot/__tests__/clock.react.test.js](#user-content-r0s206)|1 ✅|||62ms| +|[examples/snapshot/__tests__/link.react.test.js](#user-content-r0s207)|4 ✅|||181ms| +|[examples/timer/__tests__/infinite_timer_game.test.js](#user-content-r0s208)|1 ✅|||94ms| +|[examples/timer/__tests__/timer_game.test.js](#user-content-r0s209)|3 ✅|||74ms| +|[examples/typescript/__tests__/calc.test.ts](#user-content-r0s210)|6 ✅|||276ms| +|[examples/typescript/__tests__/CheckboxWithLabel-test.tsx](#user-content-r0s211)|1 ✅|||227ms| +|[examples/typescript/__tests__/sub-test.ts](#user-content-r0s212)|1 ✅|||43ms| +|[examples/typescript/__tests__/sum-test.ts](#user-content-r0s213)|2 ✅|||69ms| +|[examples/typescript/__tests__/sum.test.js](#user-content-r0s214)|2 ✅|||100ms| +|[packages/babel-jest/src/__tests__/index.ts](#user-content-r0s215)|6 ✅|||371ms| +|[packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts](#user-content-r0s216)|4 ✅|||347ms| +|[packages/diff-sequences/src/__tests__/index.property.test.ts](#user-content-r0s217)|7 ✅|||357ms| +|[packages/diff-sequences/src/__tests__/index.test.ts](#user-content-r0s218)|48 ✅|||195ms| +|[packages/expect/src/__tests__/assertionCounts.test.ts](#user-content-r0s219)|6 ✅|||60ms| +|[packages/expect/src/__tests__/asymmetricMatchers.test.ts](#user-content-r0s220)|38 ✅|||207ms| +|[packages/expect/src/__tests__/extend.test.ts](#user-content-r0s221)|10 ✅|||99ms| +|[packages/expect/src/__tests__/isError.test.ts](#user-content-r0s222)|4 ✅|||43ms| +|[packages/expect/src/__tests__/matchers-toContain.property.test.ts](#user-content-r0s223)|2 ✅|||236ms| +|[packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts](#user-content-r0s224)|2 ✅|||287ms| +|[packages/expect/src/__tests__/matchers-toEqual.property.test.ts](#user-content-r0s225)|2 ✅|||1s| +|[packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts](#user-content-r0s226)|3 ✅|||394ms| +|[packages/expect/src/__tests__/matchers.test.js](#user-content-r0s227)|592 ✅|||862ms| +|[packages/expect/src/__tests__/spyMatchers.test.ts](#user-content-r0s228)|248 ✅|||395ms| +|[packages/expect/src/__tests__/stacktrace.test.ts](#user-content-r0s229)|3 ✅|||69ms| +|[packages/expect/src/__tests__/symbolInObjects.test.ts](#user-content-r0s230)|3 ✅|||33ms| +|[packages/expect/src/__tests__/toEqual-dom.test.ts](#user-content-r0s231)|12 ✅|||99ms| +|[packages/expect/src/__tests__/toThrowMatchers.test.ts](#user-content-r0s232)|98 ✅|||257ms| +|[packages/expect/src/__tests__/utils.test.ts](#user-content-r0s233)|41 ✅|||147ms| +|[packages/jest-circus/src/__tests__/afterAll.test.ts](#user-content-r0s234)|6 ✅|||6s| +|[packages/jest-circus/src/__tests__/baseTest.test.ts](#user-content-r0s235)|2 ✅|||3s| +|[packages/jest-circus/src/__tests__/circusItTestError.test.ts](#user-content-r0s236)|8 ✅|||300ms| +|[packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts](#user-content-r0s237)|3 ✅|||81ms| +|[packages/jest-circus/src/__tests__/hooks.test.ts](#user-content-r0s238)|3 ✅|||4s| +|[packages/jest-circus/src/__tests__/hooksError.test.ts](#user-content-r0s239)|32 ✅|||127ms| +|[packages/jest-cli/src/__tests__/cli/args.test.ts](#user-content-r0s240)|17 ✅|||345ms| +|[packages/jest-cli/src/init/__tests__/init.test.js](#user-content-r0s241)|24 ✅|||119ms| +|[packages/jest-cli/src/init/__tests__/modifyPackageJson.test.ts](#user-content-r0s242)|4 ✅|||30ms| +|[packages/jest-config/src/__tests__/Defaults.test.ts](#user-content-r0s243)|1 ✅|||672ms| +|[packages/jest-config/src/__tests__/getMaxWorkers.test.ts](#user-content-r0s244)|7 ✅|||67ms| +|[packages/jest-config/src/__tests__/normalize.test.js](#user-content-r0s245)|118 ✅|||798ms| +|[packages/jest-config/src/__tests__/readConfig.test.ts](#user-content-r0s246)|1 ✅|||76ms| +|[packages/jest-config/src/__tests__/readConfigs.test.ts](#user-content-r0s247)|3 ✅|||135ms| +|[packages/jest-config/src/__tests__/resolveConfigPath.test.ts](#user-content-r0s248)|10 ✅|||183ms| +|[packages/jest-config/src/__tests__/setFromArgv.test.ts](#user-content-r0s249)|4 ✅|||53ms| +|[packages/jest-config/src/__tests__/validatePattern.test.ts](#user-content-r0s250)|4 ✅|||52ms| +|[packages/jest-console/src/__tests__/bufferedConsole.test.ts](#user-content-r0s251)|20 ✅|||171ms| +|[packages/jest-console/src/__tests__/CustomConsole.test.ts](#user-content-r0s252)|23 ✅|||115ms| +|[packages/jest-console/src/__tests__/getConsoleOutput.test.ts](#user-content-r0s253)|12 ✅|||56ms| +|[packages/jest-core/src/__tests__/FailedTestsCache.test.js](#user-content-r0s254)|1 ✅|||25ms| +|[packages/jest-core/src/__tests__/getNoTestsFoundMessage.test.js](#user-content-r0s255)|5 ✅|||61ms| +|[packages/jest-core/src/__tests__/globals.test.ts](#user-content-r0s256)|1 ✅|||22ms| +|[packages/jest-core/src/__tests__/runJest.test.js](#user-content-r0s257)|2 ✅|||261ms| +|[packages/jest-core/src/__tests__/SearchSource.test.ts](#user-content-r0s258)|27 ✅|||3s| +|[packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js](#user-content-r0s259)|13 ✅|||89ms| +|[packages/jest-core/src/__tests__/TestScheduler.test.js](#user-content-r0s260)|8 ✅|||520ms| +|[packages/jest-core/src/__tests__/testSchedulerHelper.test.js](#user-content-r0s261)|12 ✅|||48ms| +|[packages/jest-core/src/__tests__/watch.test.js](#user-content-r0s262)|80 ✅|||7s| +|[packages/jest-core/src/__tests__/watchFileChanges.test.ts](#user-content-r0s263)|1 ✅|||2s| +|[packages/jest-core/src/__tests__/watchFilenamePatternMode.test.js](#user-content-r0s264)|2 ✅|||165ms| +|[packages/jest-core/src/__tests__/watchTestNamePatternMode.test.js](#user-content-r0s265)|1 ✅|||246ms| +|[packages/jest-core/src/lib/__tests__/isValidPath.test.ts](#user-content-r0s266)|3 ✅|||166ms| +|[packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts](#user-content-r0s267)|3 ✅|||48ms| +|[packages/jest-create-cache-key-function/src/__tests__/index.test.ts](#user-content-r0s268)|1 ✅|||75ms| +|[packages/jest-diff/src/__tests__/diff.test.ts](#user-content-r0s269)|107 ✅|||625ms| +|[packages/jest-diff/src/__tests__/diffStringsRaw.test.ts](#user-content-r0s270)|2 ✅|||55ms| +|[packages/jest-diff/src/__tests__/getAlignedDiffs.test.ts](#user-content-r0s271)|24 ✅|||72ms| +|[packages/jest-diff/src/__tests__/joinAlignedDiffs.test.ts](#user-content-r0s272)|6 ✅|||44ms| +|[packages/jest-docblock/src/__tests__/index.test.ts](#user-content-r0s273)|36 ✅|||177ms| +|[packages/jest-each/src/__tests__/array.test.ts](#user-content-r0s274)|159 ✅|||192ms| +|[packages/jest-each/src/__tests__/index.test.ts](#user-content-r0s275)|10 ✅|||44ms| +|[packages/jest-each/src/__tests__/template.test.ts](#user-content-r0s276)|242 ✅|||483ms| +|[packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts](#user-content-r0s277)|2 ✅|||783ms| +|[packages/jest-environment-node/src/__tests__/node_environment.test.ts](#user-content-r0s278)|6 ✅|||184ms| +|[packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts](#user-content-r0s279)|50 ✅|||302ms| +|[packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts](#user-content-r0s280)|40 ✅|||317ms| +|[packages/jest-get-type/src/__tests__/getType.test.ts](#user-content-r0s281)|14 ✅|||45ms| +|[packages/jest-get-type/src/__tests__/isPrimitive.test.ts](#user-content-r0s282)|18 ✅|||36ms| +|[packages/jest-globals/src/__tests__/index.ts](#user-content-r0s283)|1 ✅|||533ms| +|[packages/jest-haste-map/src/__tests__/get_mock_name.test.js](#user-content-r0s284)|1 ✅|||22ms| +|[packages/jest-haste-map/src/__tests__/includes_dotfiles.test.ts](#user-content-r0s285)|1 ✅|||337ms| +|[packages/jest-haste-map/src/__tests__/index.test.js](#user-content-r0s286)|44 ✅|||1s| +|[packages/jest-haste-map/src/__tests__/worker.test.js](#user-content-r0s287)|7 ✅|||100ms| +|[packages/jest-haste-map/src/crawlers/__tests__/node.test.js](#user-content-r0s288)|10 ✅|||170ms| +|[packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js](#user-content-r0s289)|8 ✅|||153ms| +|[packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js](#user-content-r0s290)|15 ✅|||56ms| +|[packages/jest-haste-map/src/lib/__tests__/fast_path.test.js](#user-content-r0s291)|5 ✅|||29ms| +|[packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js](#user-content-r0s292)|1 ✅|||35ms| +|[packages/jest-haste-map/src/lib/__tests__/isRegExpSupported.test.js](#user-content-r0s293)|2 ✅|||31ms| +|[packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js](#user-content-r0s294)|2 ✅|||35ms| +|[packages/jest-jasmine2/src/__tests__/concurrent.test.ts](#user-content-r0s295)|3 ✅|||24ms| +|[packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts](#user-content-r0s296)|7 ✅|||70ms| +|[packages/jest-jasmine2/src/__tests__/hooksError.test.ts](#user-content-r0s297)|32 ✅|||51ms| +|[packages/jest-jasmine2/src/__tests__/iterators.test.ts](#user-content-r0s298)|4 ✅|||43ms| +|[packages/jest-jasmine2/src/__tests__/itTestError.test.ts](#user-content-r0s299)|6 ✅|||32ms| +|[packages/jest-jasmine2/src/__tests__/itToTestAlias.test.ts](#user-content-r0s300)|1 ✅|||23ms| +|[packages/jest-jasmine2/src/__tests__/pTimeout.test.ts](#user-content-r0s301)|3 ✅|||44ms| +|[packages/jest-jasmine2/src/__tests__/queueRunner.test.ts](#user-content-r0s302)|6 ✅|||93ms| +|[packages/jest-jasmine2/src/__tests__/reporter.test.ts](#user-content-r0s303)|1 ✅|||107ms| +|[packages/jest-jasmine2/src/__tests__/Suite.test.ts](#user-content-r0s304)|1 ✅|||84ms| +|[packages/jest-jasmine2/src/__tests__/todoError.test.ts](#user-content-r0s305)|3 ✅|||27ms| +|[packages/jest-leak-detector/src/__tests__/index.test.ts](#user-content-r0s306)|6 ✅|||986ms| +|[packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts](#user-content-r0s307)|11 ✅|||49ms| +|[packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceableDom.test.ts](#user-content-r0s308)|2 ✅|||48ms| +|[packages/jest-matcher-utils/src/__tests__/index.test.ts](#user-content-r0s309)|48 ✅|||391ms| +|[packages/jest-matcher-utils/src/__tests__/printDiffOrStringify.test.ts](#user-content-r0s310)|21 ✅|||114ms| +|[packages/jest-matcher-utils/src/__tests__/Replaceable.test.ts](#user-content-r0s311)|17 ✅|||111ms| +|[packages/jest-message-util/src/__tests__/messages.test.ts](#user-content-r0s312)|11 ✅|||205ms| +|[packages/jest-mock/src/__tests__/index.test.ts](#user-content-r0s313)|84 ✅|||509ms| +|[packages/jest-regex-util/src/__tests__/index.test.ts](#user-content-r0s314)|8 ✅|||56ms| +|[packages/jest-repl/src/__tests__/jest_repl.test.js](#user-content-r0s315)|1 ✅|||1s| +|[packages/jest-repl/src/__tests__/runtime_cli.test.js](#user-content-r0s316)|4 ✅|||4s| +|[packages/jest-reporters/src/__tests__/CoverageReporter.test.js](#user-content-r0s317)|12 ✅|||397ms| +|[packages/jest-reporters/src/__tests__/CoverageWorker.test.js](#user-content-r0s318)|2 ✅|||199ms| +|[packages/jest-reporters/src/__tests__/DefaultReporter.test.js](#user-content-r0s319)|2 ✅|||148ms| +|[packages/jest-reporters/src/__tests__/generateEmptyCoverage.test.js](#user-content-r0s320)|3 ✅|||1s| +|[packages/jest-reporters/src/__tests__/getResultHeader.test.js](#user-content-r0s321)|4 ✅|||30ms| +|[packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js](#user-content-r0s322)|3 ✅|||28ms| +|[packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js](#user-content-r0s323)|4 ✅|||49ms| +|[packages/jest-reporters/src/__tests__/getWatermarks.test.ts](#user-content-r0s324)|2 ✅|||37ms| +|[packages/jest-reporters/src/__tests__/NotifyReporter.test.ts](#user-content-r0s325)|18 ✅|||166ms| +|[packages/jest-reporters/src/__tests__/SummaryReporter.test.js](#user-content-r0s326)|4 ✅|||366ms| +|[packages/jest-reporters/src/__tests__/utils.test.ts](#user-content-r0s327)|10 ✅|||85ms| +|[packages/jest-reporters/src/__tests__/VerboseReporter.test.js](#user-content-r0s328)|11 ✅|||425ms| +|[packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts](#user-content-r0s329)|11 ✅|||666ms| +|[packages/jest-resolve/src/__tests__/isBuiltinModule.test.ts](#user-content-r0s330)|4 ✅|||36ms| +|[packages/jest-resolve/src/__tests__/resolve.test.ts](#user-content-r0s331)|16 ✅|||1s| +|[packages/jest-runner/src/__tests__/testRunner.test.ts](#user-content-r0s332)|2 ✅|||905ms| +|[packages/jest-runtime/src/__tests__/instrumentation.test.ts](#user-content-r0s333)|1 ✅|||275ms| +|[packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js](#user-content-r0s334)|3 ✅|||606ms| +|[packages/jest-runtime/src/__tests__/runtime_environment.test.js](#user-content-r0s335)|2 ✅|||497ms| +|[packages/jest-runtime/src/__tests__/runtime_internal_module.test.js](#user-content-r0s336)|4 ✅|||727ms| +|[packages/jest-runtime/src/__tests__/runtime_jest_fn.js](#user-content-r0s337)|4 ✅|||479ms| +|[packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js](#user-content-r0s338)|2 ✅|||521ms| +|[packages/jest-runtime/src/__tests__/runtime_mock.test.js](#user-content-r0s339)|4 ✅|||743ms| +|[packages/jest-runtime/src/__tests__/runtime_module_directories.test.js](#user-content-r0s340)|4 ✅|||525ms| +|[packages/jest-runtime/src/__tests__/runtime_node_path.test.js](#user-content-r0s341)|4 ✅|||1s| +|[packages/jest-runtime/src/__tests__/runtime_require_actual.test.js](#user-content-r0s342)|2 ✅|||478ms| +|[packages/jest-runtime/src/__tests__/runtime_require_cache.test.js](#user-content-r0s343)|2 ✅|||454ms| +|[packages/jest-runtime/src/__tests__/runtime_require_mock.test.js](#user-content-r0s344)|13 ✅|||962ms| +|[packages/jest-runtime/src/__tests__/runtime_require_module_no_ext.test.js](#user-content-r0s345)|1 ✅|||261ms| +|[packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js](#user-content-r0s346)|6 ✅|||2s| +|[packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js](#user-content-r0s347)|17 ✅|||1s| +|[packages/jest-runtime/src/__tests__/runtime_require_module.test.js](#user-content-r0s348)|27 ✅|||2s| +|[packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts](#user-content-r0s349)|5 ✅|||707ms| +|[packages/jest-runtime/src/__tests__/runtime_wrap.js](#user-content-r0s350)|2 ✅|||263ms| +|[packages/jest-runtime/src/__tests__/Runtime-sourceMaps.test.js](#user-content-r0s351)|1 ✅|||584ms| +|[packages/jest-runtime/src/__tests__/Runtime-statics.test.js](#user-content-r0s352)|2 ✅|||162ms| +|[packages/jest-serializer/src/__tests__/index.test.ts](#user-content-r0s353)|17 ✅|||158ms| +|[packages/jest-snapshot/src/__tests__/dedentLines.test.ts](#user-content-r0s354)|17 ✅|||94ms| +|[packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts](#user-content-r0s355)|22 ✅|||1s| +|[packages/jest-snapshot/src/__tests__/matcher.test.ts](#user-content-r0s356)|1 ✅|||131ms| +|[packages/jest-snapshot/src/__tests__/mockSerializer.test.ts](#user-content-r0s357)|10 ✅|||45ms| +|[packages/jest-snapshot/src/__tests__/printSnapshot.test.ts](#user-content-r0s358)|71 ✅|||1s| +|[packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts](#user-content-r0s359)|10 ✅|||98ms| +|[packages/jest-snapshot/src/__tests__/throwMatcher.test.ts](#user-content-r0s360)|3 ✅|||481ms| +|[packages/jest-snapshot/src/__tests__/utils.test.ts](#user-content-r0s361)|26 ✅|||214ms| +|[packages/jest-source-map/src/__tests__/getCallsite.test.ts](#user-content-r0s362)|3 ✅|||86ms| +|[packages/jest-test-result/src/__tests__/formatTestResults.test.ts](#user-content-r0s363)|1 ✅|||53ms| +|[packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js](#user-content-r0s364)|8 ✅|||251ms| +|[packages/jest-transform/src/__tests__/ScriptTransformer.test.ts](#user-content-r0s365)|22 ✅|||2s| +|[packages/jest-transform/src/__tests__/shouldInstrument.test.ts](#user-content-r0s366)|25 ✅|||155ms| +|[packages/jest-util/src/__tests__/createProcessObject.test.ts](#user-content-r0s367)|4 ✅|||81ms| +|[packages/jest-util/src/__tests__/deepCyclicCopy.test.ts](#user-content-r0s368)|12 ✅|||86ms| +|[packages/jest-util/src/__tests__/errorWithStack.test.ts](#user-content-r0s369)|1 ✅|||41ms| +|[packages/jest-util/src/__tests__/formatTime.test.ts](#user-content-r0s370)|11 ✅|||82ms| +|[packages/jest-util/src/__tests__/globsToMatcher.test.ts](#user-content-r0s371)|4 ✅|||56ms| +|[packages/jest-util/src/__tests__/installCommonGlobals.test.ts](#user-content-r0s372)|2 ✅|||68ms| +|[packages/jest-util/src/__tests__/isInteractive.test.ts](#user-content-r0s373)|2 ✅|||35ms| +|[packages/jest-util/src/__tests__/isPromise.test.ts](#user-content-r0s374)|10 ✅|||30ms| +|[packages/jest-validate/src/__tests__/validate.test.ts](#user-content-r0s375)|23 ✅|||283ms| +|[packages/jest-validate/src/__tests__/validateCLIOptions.test.js](#user-content-r0s376)|6 ✅|||83ms| +|[packages/jest-watcher/src/lib/__tests__/formatTestNameByPattern.test.ts](#user-content-r0s377)|11 ✅|||129ms| +|[packages/jest-watcher/src/lib/__tests__/prompt.test.ts](#user-content-r0s378)|3 ✅|||91ms| +|[packages/jest-watcher/src/lib/__tests__/scroll.test.ts](#user-content-r0s379)|5 ✅|||57ms| +|[packages/jest-worker/src/__tests__/Farm.test.js](#user-content-r0s380)|10 ✅|||158ms| +|[packages/jest-worker/src/__tests__/FifoQueue.test.js](#user-content-r0s381)|3 ✅|||48ms| +|[packages/jest-worker/src/__tests__/index.test.js](#user-content-r0s382)|8 ✅|||230ms| +|[packages/jest-worker/src/__tests__/PriorityQueue.test.js](#user-content-r0s383)|5 ✅|||63ms| +|[packages/jest-worker/src/__tests__/process-integration.test.js](#user-content-r0s384)|5 ✅|||62ms| +|[packages/jest-worker/src/__tests__/thread-integration.test.js](#user-content-r0s385)|6 ✅|||114ms| +|[packages/jest-worker/src/__tests__/WorkerPool.test.js](#user-content-r0s386)|3 ✅|||51ms| +|[packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.js](#user-content-r0s387)|11 ✅|||653ms| +|[packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.js](#user-content-r0s388)|17 ✅|||184ms| +|[packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js](#user-content-r0s389)|15 ✅|||258ms| +|[packages/jest-worker/src/workers/__tests__/processChild.test.js](#user-content-r0s390)|10 ✅|||135ms| +|[packages/jest-worker/src/workers/__tests__/threadChild.test.js](#user-content-r0s391)|10 ✅|||120ms| +|[packages/pretty-format/src/__tests__/AsymmetricMatcher.test.ts](#user-content-r0s392)|38 ✅|||137ms| +|[packages/pretty-format/src/__tests__/ConvertAnsi.test.ts](#user-content-r0s393)|6 ✅|||43ms| +|[packages/pretty-format/src/__tests__/DOMCollection.test.ts](#user-content-r0s394)|10 ✅|||64ms| +|[packages/pretty-format/src/__tests__/DOMElement.test.ts](#user-content-r0s395)|28 ✅|||148ms| +|[packages/pretty-format/src/__tests__/Immutable.test.ts](#user-content-r0s396)|111 ✅|||443ms| +|[packages/pretty-format/src/__tests__/prettyFormat.test.ts](#user-content-r0s397)|86 ✅|||219ms| +|[packages/pretty-format/src/__tests__/react.test.tsx](#user-content-r0s398)|55 ✅|||325ms| +|[packages/pretty-format/src/__tests__/ReactElement.test.ts](#user-content-r0s399)|3 ✅|||64ms| +### ✅ e2e/__tests__/asyncAndCallback.test.ts ``` -✔️ gets hg SCM roots and dedupes them -✔️ gets git SCM roots and dedupes them -✔️ gets mixed git and hg SCM roots and dedupes them -✔️ gets changed files for git -✔️ monitors only root paths for git -✔️ does not find changes in files with no diff, for git -✔️ handles a bad revision for "changedSince", for git +✅ errors when a test both returns a promise and takes a callback +``` +### ✅ e2e/__tests__/asyncRegenerator.test.ts +``` +✅ successfully transpiles async +``` +### ✅ e2e/__tests__/autoClearMocks.test.ts +``` +✅ suite with auto-clear +✅ suite without auto-clear +``` +### ✅ e2e/__tests__/autoResetMocks.test.ts +``` +✅ suite with auto-reset +✅ suite without auto-reset +``` +### ✅ e2e/__tests__/autoRestoreMocks.test.ts +``` +✅ suite with auto-restore +✅ suite without auto-restore +``` +### ✅ e2e/__tests__/babelPluginJestHoist.test.ts +``` +✅ successfully runs the tests inside `babel-plugin-jest-hoist/` +``` +### ✅ e2e/__tests__/badSourceMap.test.ts +``` +✅ suite with test cases that contain malformed sourcemaps +``` +### ✅ e2e/__tests__/beforeAllFiltered.ts +``` +Correct BeforeAll run + ✅ ensures the BeforeAll of ignored suite is not run +``` +### ✅ e2e/__tests__/beforeEachQueue.ts +``` +✅ does not work on jest-circus +Correct beforeEach order + ⚪ ensures the correct order for beforeEach +``` +### ✅ e2e/__tests__/callDoneTwice.test.ts +``` +✅ `done()` should not be called more than once +``` +### ✅ e2e/__tests__/chaiAssertionLibrary.ts +``` +✅ chai assertion errors should display properly +``` +### ✅ e2e/__tests__/circularInequality.test.ts +``` +✅ handles circular inequality properly +``` +### ✅ e2e/__tests__/circusConcurrentEach.test.ts +``` +✅ works with concurrent.each +✅ works with concurrent.only.each +``` +### ✅ e2e/__tests__/circusDeclarationErrors.test.ts +``` +✅ defining tests and hooks asynchronously throws +``` +### ✅ e2e/__tests__/clearCache.test.ts +``` +jest --clearCache + ✅ normal run results in cache directory being written + ✅ clearCache results in deleted directory and exitCode 0 +``` +### ✅ e2e/__tests__/cliHandlesExactFilenames.test.ts +``` +✅ CLI accepts exact file names if matchers matched +✅ CLI skips exact file names if no matchers matched +``` +### ✅ e2e/__tests__/compareDomNodes.test.ts +``` +✅ does not crash when expect involving a DOM node fails +``` +### ✅ e2e/__tests__/config.test.ts +``` +✅ config as JSON +✅ works with sane config JSON +✅ watchman config option is respected over default argv +✅ config from argv is respected with sane config JSON +✅ works with jsdom testEnvironmentOptions config JSON +✅ negated flags override previous flags +``` +### ✅ e2e/__tests__/console.test.ts +``` +✅ console printing +✅ console printing with --verbose +✅ does not print to console with --silent +✅ respects --noStackTrace +✅ respects noStackTrace in config +✅ the jsdom console is the same as the test console +✅ does not error out when using winston +``` +### ✅ e2e/__tests__/consoleAfterTeardown.test.ts +``` +✅ console printing +``` +### ✅ e2e/__tests__/consoleLogOutputWhenRunInBand.test.ts +``` +✅ prints console.logs when run with forceExit +``` +### ✅ e2e/__tests__/coverageHandlebars.test.ts +``` +✅ code coverage for Handlebars +``` +### ✅ e2e/__tests__/coverageRemapping.test.ts +``` +✅ maps code coverage against original source +``` +### ✅ e2e/__tests__/coverageReport.test.ts +``` +✅ outputs coverage report +✅ collects coverage only from specified file +✅ collects coverage only from multiple specified files +✅ collects coverage only from specified files avoiding dependencies +✅ json reporter printing with --coverage +✅ outputs coverage report as json +✅ outputs coverage report when text is requested +✅ outputs coverage report when text-summary is requested +✅ outputs coverage report when text and text-summary is requested +✅ does not output coverage report when html is requested +✅ collects coverage from duplicate files avoiding shared cache +✅ generates coverage when using the testRegex config param +``` +### ✅ e2e/__tests__/coverageThreshold.test.ts +``` +✅ exits with 1 if coverage threshold is not met +✅ exits with 1 if path threshold group is not found in coverage data +✅ exits with 0 if global threshold group is not found in coverage data +✅ excludes tests matched by path threshold groups from global group +✅ file is matched by all path and glob threshold groups +``` +### ✅ e2e/__tests__/coverageTransformInstrumented.test.ts +``` +✅ code coverage for transform instrumented code +``` +### ✅ e2e/__tests__/coverageWithoutTransform.test.ts +``` +✅ produces code coverage for uncovered files without transformer +``` +### ✅ e2e/__tests__/createProcessObject.test.ts +``` +✅ allows retrieving the current domain +``` +### ✅ e2e/__tests__/customInlineSnapshotMatchers.test.ts +``` +✅ works with custom inline snapshot matchers +``` +### ✅ e2e/__tests__/customMatcherStackTrace.test.ts +``` +✅ works with custom matchers +✅ custom async matchers +``` +### ✅ e2e/__tests__/customReporters.test.ts +``` +Custom Reporters Integration + ✅ valid string format for adding reporters + ✅ valid array format for adding reporters + ✅ invalid format for adding reporters + ✅ default reporters enabled + ✅ TestReporter with all tests passing + ✅ TestReporter with all tests failing + ✅ IncompleteReporter for flexibility + ✅ reporters can be default exports + ✅ prints reporter errors +``` +### ✅ e2e/__tests__/customResolver.test.ts +``` +✅ use the custom resolver +``` +### ✅ e2e/__tests__/customTestSequencers.test.ts +``` +✅ run prioritySequence first sync +✅ run prioritySequence first async +✅ run failed tests async +``` +### ✅ e2e/__tests__/debug.test.ts +``` +jest --debug + ✅ outputs debugging info before running the test +``` +### ✅ e2e/__tests__/declarationErrors.test.ts +``` +✅ errors if describe returns a Promise +✅ errors if describe returns something +✅ errors if describe throws +``` +### ✅ e2e/__tests__/dependencyClash.test.ts +``` +✅ does not require project modules from inside node_modules +``` +### ✅ e2e/__tests__/detectOpenHandles.ts +``` +✅ prints message about flag on slow tests +✅ prints message about flag on forceExit +✅ prints out info about open handlers +✅ does not report promises +✅ prints out info about open handlers from inside tests +on node >=11.10.0 + ✅ does not report ELD histograms +notify + ✅ does not report --notify flag +on node >=11 + ✅ does not report timeouts using unref +``` +### ✅ e2e/__tests__/domDiffing.test.ts +``` +✅ should work without error +``` +### ✅ e2e/__tests__/doneInHooks.test.ts +``` +✅ `done()` works properly in hooks +``` +### ✅ e2e/__tests__/dynamicRequireDependencies.ts +``` +✅ successfully runs tests with dynamic dependencies +``` +### ✅ e2e/__tests__/each.test.ts +``` +✅ works with passing tests +✅ shows error message when not enough arguments are supplied to tests +✅ shows the correct errors in stderr when failing tests +✅ shows only the tests with .only as being ran +✅ shows only the tests without .skip as being ran +✅ runs only the describe.only.each tests +✅ formats args with pretty format when given %p +``` +### ✅ e2e/__tests__/emptyDescribeWithHooks.test.ts +``` +✅ hook in empty describe +✅ hook in describe with skipped test +✅ hook in empty nested describe +✅ multiple hooks in empty describe +``` +### ✅ e2e/__tests__/emptySuiteError.test.ts +``` +JSON Reporter + ✅ fails the test suite if it contains no tests +``` +### ✅ e2e/__tests__/env.test.ts +``` +Environment override + ✅ uses jsdom when specified + ✅ uses node as default from package.json + ✅ uses node when specified + ✅ fails when the env is not available +Environment equivalent + ✅ uses jsdom + ✅ uses node +``` +### ✅ e2e/__tests__/environmentAfterTeardown.test.ts +``` +✅ prints useful error for environment methods after test is done +``` +### ✅ e2e/__tests__/errorOnDeprecated.test.ts +``` +✅ does not work on jest-circus +⚪ fail.test.js errors in errorOnDeprecated mode +⚪ jasmine.addMatchers.test.js errors in errorOnDeprecated mode +⚪ jasmine.any.test.js errors in errorOnDeprecated mode +⚪ jasmine.anything.test.js errors in errorOnDeprecated mode +⚪ jasmine.arrayContaining.test.js errors in errorOnDeprecated mode +⚪ jasmine.createSpy.test.js errors in errorOnDeprecated mode +⚪ jasmine.objectContaining.test.js errors in errorOnDeprecated mode +⚪ jasmine.stringMatching.test.js errors in errorOnDeprecated mode +⚪ pending.test.js errors in errorOnDeprecated mode +⚪ spyOn.test.js errors in errorOnDeprecated mode +⚪ spyOnProperty.test.js errors in errorOnDeprecated mode +⚪ defaultTimeoutInterval.test.js errors in errorOnDeprecated mode +⚪ fail.test.js errors when not in errorOnDeprecated mode +⚪ jasmine.addMatchers.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.any.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.anything.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.arrayContaining.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.createSpy.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.objectContaining.test.js passes when not in errorOnDeprecated mode +⚪ jasmine.stringMatching.test.js passes when not in errorOnDeprecated mode +⚪ pending.test.js passes when not in errorOnDeprecated mode +⚪ spyOn.test.js passes when not in errorOnDeprecated mode +⚪ spyOnProperty.test.js errors when not in errorOnDeprecated mode +⚪ defaultTimeoutInterval.test.js passes when not in errorOnDeprecated mode +``` +### ✅ e2e/__tests__/esmConfigFile.test.ts +``` +✅ reads config from cjs file +on node ^12.17.0 || >=13.2.0 + ✅ reads config from mjs file + ✅ reads config from js file when package.json#type=module +``` +### ✅ e2e/__tests__/executeTestsOnceInMpr.ts +``` +✅ Tests are executed only once even in an MPR +``` +### ✅ e2e/__tests__/existentRoots.test.ts +``` +✅ error when rootDir does not exist +✅ error when rootDir is a file +✅ error when roots directory does not exist +✅ error when roots is a file +``` +### ✅ e2e/__tests__/expectAsyncMatcher.test.ts +``` +✅ works with passing tests +✅ shows the correct errors in stderr when failing tests +``` +### ✅ e2e/__tests__/expectInVm.test.ts +``` +✅ expect works correctly with RegExps created inside a VM +``` +### ✅ e2e/__tests__/extraGlobals.test.ts +``` +✅ works with injected globals +``` +### ✅ e2e/__tests__/failureDetailsProperty.test.ts +``` +✅ that the failureDetails property is set +``` +### ✅ e2e/__tests__/failures.test.ts +``` +✅ not throwing Error objects +✅ works with node assert +✅ works with assertions in separate files +✅ works with async failures +✅ works with snapshot failures +✅ works with snapshot failures with hint +✅ errors after test has completed +``` +### ✅ e2e/__tests__/fakePromises.test.ts +``` +Fake promises + ✅ should be possible to resolve with fake timers using immediates + ✅ should be possible to resolve with fake timers using asap +``` +### ✅ e2e/__tests__/fatalWorkerError.test.ts +``` +✅ fails a test that terminates the worker with a fatal error +``` +### ✅ e2e/__tests__/filter.test.ts +``` +Dynamic test filtering + ✅ uses the default JSON option + ✅ uses the CLI option + ✅ ignores the filter if requested to do so + ✅ throws when you return clowny stuff + ✅ will call setup on filter before filtering + ✅ will print error when filter throws + ✅ will return no results when setup hook throws +``` +### ✅ e2e/__tests__/findRelatedFiles.test.ts +``` +--findRelatedTests flag + ✅ runs tests related to filename + ✅ runs tests related to uppercased filename on case-insensitive os + ✅ runs tests related to filename with a custom dependency extractor + ✅ generates coverage report for filename + ✅ coverage configuration is applied correctly +``` +### ✅ e2e/__tests__/focusedTests.test.ts +``` +✅ runs only "it.only" tests +``` +### ✅ e2e/__tests__/forceExit.test.ts +``` +✅ exits the process after test are done but before timers complete +``` +### ✅ e2e/__tests__/generatorMock.test.ts +``` +✅ mock works with generator +``` +### ✅ e2e/__tests__/global-mutation.test.ts +``` +✅ can redefine global +``` +### ✅ e2e/__tests__/global.test.ts +``` +✅ globals are properly defined +``` +### ✅ e2e/__tests__/globals.test.ts +``` +✅ basic test constructs +✅ interleaved describe and test children order +✅ skips +✅ only +✅ cannot have describe with no implementation +✅ cannot test with no implementation +✅ skips with expand arg +✅ only with expand arg +✅ cannot test with no implementation with expand arg +✅ function as descriptor +``` +### ✅ e2e/__tests__/globalSetup.test.ts +``` +✅ globalSetup is triggered once before all test suites +✅ jest throws an error when globalSetup does not export a function +✅ globalSetup function gets jest config object as a parameter +✅ should call globalSetup function of multiple projects +✅ should not call a globalSetup of a project if there are no tests to run from this project +✅ should not call any globalSetup if there are no tests to run +✅ globalSetup works with default export +✅ globalSetup throws with named export +✅ should not transpile the transformer +✅ should transform node_modules if configured by transformIgnorePatterns +``` +### ✅ e2e/__tests__/globalTeardown.test.ts +``` +✅ globalTeardown is triggered once after all test suites +✅ jest throws an error when globalTeardown does not export a function +✅ globalTeardown function gets jest config object as a parameter +✅ should call globalTeardown function of multiple projects +✅ should not call a globalTeardown of a project if there are no tests to run from this project +✅ globalTeardown works with default export +✅ globalTeardown throws with named export +``` +### ✅ e2e/__tests__/hasteMapMockChanged.test.ts +``` +✅ should not warn when a mock file changes +``` +### ✅ e2e/__tests__/hasteMapSha1.test.ts +``` +✅ exits the process after test are done but before timers complete +``` +### ✅ e2e/__tests__/hasteMapSize.test.ts +``` +✅ reports the correct file size +✅ updates the file size when a file changes +``` +### ✅ e2e/__tests__/importedGlobals.test.ts +``` +✅ imported globals +``` +### ✅ e2e/__tests__/injectGlobals.test.ts +``` +✅ globals are undefined if passed `false` from CLI +✅ globals are undefined if passed `false` from config +``` +### ✅ e2e/__tests__/jasmineAsync.test.ts +``` +async jasmine + ✅ works with beforeAll + ✅ works with beforeEach + ✅ works with afterAll + ✅ works with afterEach + ✅ works with fit + ✅ works with xit + ✅ throws when not a promise is returned + ✅ tests async promise code + ✅ works with concurrent + ✅ works with concurrent within a describe block when invoked with testNamePattern + ✅ works with concurrent.each + ✅ works with concurrent.only.each + ✅ doesn't execute more than 5 tests simultaneously + ✅ async test fails + ✅ generator test +``` +### ✅ e2e/__tests__/jasmineAsyncWithPendingDuringTest.ts +``` +async jasmine with pending during test + ✅ does not work on jest-circus + ⚪ should be reported as a pending test +``` +### ✅ e2e/__tests__/jest.config.js.test.ts +``` +✅ works with jest.config.js +✅ traverses directory tree up until it finds jest.config +✅ invalid JS in jest.config.js +``` +### ✅ e2e/__tests__/jest.config.ts.test.ts +``` +✅ works with jest.config.ts +✅ works with tsconfig.json +✅ traverses directory tree up until it finds jest.config +✅ it does type check the config +✅ invalid JS in jest.config.ts +``` +### ❌ e2e/__tests__/jestChangedFiles.test.ts +``` +✅ gets hg SCM roots and dedupes them +✅ gets git SCM roots and dedupes them +✅ gets mixed git and hg SCM roots and dedupes them +✅ gets changed files for git +✅ monitors only root paths for git +✅ does not find changes in files with no diff, for git +✅ handles a bad revision for "changedSince", for git ❌ gets changed files for hg Error: abort: empty revision range -✔️ monitors only root paths for hg -✔️ handles a bad revision for "changedSince", for hg +✅ monitors only root paths for hg +✅ handles a bad revision for "changedSince", for hg ``` -### ❌ e2e/__tests__/onlyChanged.test.ts +### ✅ e2e/__tests__/jestEnvironmentJsdom.test.ts ``` -✔️ run for "onlyChanged" and "changedSince" -✔️ run only changed files -✔️ report test coverage for only changed files -✔️ report test coverage of source on test file change under only changed files -✔️ do not pickup non-tested files when reporting coverage on only changed files -✔️ collect test coverage when using onlyChanged -✔️ onlyChanged in config is overwritten by --all or testPathPattern +✅ check is not leaking memory +``` +### ✅ e2e/__tests__/jestRequireActual.test.ts +``` +✅ understands dependencies using jest.requireActual +``` +### ✅ e2e/__tests__/jestRequireMock.test.ts +``` +✅ understands dependencies using jest.requireMock +``` +### ✅ e2e/__tests__/json.test.ts +``` +✅ JSON is available in the global scope +✅ JSON.parse creates objects from within this context +``` +### ✅ e2e/__tests__/jsonReporter.test.ts +``` +JSON Reporter + ✅ writes test result to sum.result.json + ✅ outputs coverage report +``` +### ✅ e2e/__tests__/lifecycles.ts +``` +✅ suite with invalid assertions in afterAll +``` +### ✅ e2e/__tests__/listTests.test.ts +``` +--listTests flag + ✅ causes tests to be printed in different lines + ✅ causes tests to be printed out as JSON when using the --json flag +``` +### ✅ e2e/__tests__/locationInResults.test.ts +``` +✅ defaults to null for location +✅ adds correct location info when provided with flag +``` +### ✅ e2e/__tests__/logHeapUsage.test.ts +``` +✅ logs memory usage +``` +### ✅ e2e/__tests__/mockNames.test.ts +``` +✅ suite without mock name, mock called +✅ suite without mock name, mock not called +✅ suite with mock name, expect mock not called +✅ suite with mock name, mock called, expect fail +✅ suite with mock name, mock called 5 times +✅ suite with mock name, mock not called 5 times, expect fail +✅ suite with mock name, mock called +✅ suite with mock name, mock not called +``` +### ✅ e2e/__tests__/modernFakeTimers.test.ts +``` +modern implementation of fake timers + ✅ should be possible to use modern implementation from config + ✅ should be possible to use modern implementation from jest-object +``` +### ✅ e2e/__tests__/moduleNameMapper.test.ts +``` +✅ moduleNameMapper wrong configuration +✅ moduleNameMapper wrong array configuration +✅ moduleNameMapper correct configuration +✅ moduleNameMapper correct configuration mocking module of absolute path +✅ moduleNameMapper with mocking +``` +### ✅ e2e/__tests__/moduleParentNullInTest.ts +``` +✅ module.parent should be null in test files +``` +### ✅ e2e/__tests__/multiProjectRunner.test.ts +``` +✅ --listTests doesn't duplicate the test files +✅ can pass projects or global config +✅ "No tests found" message for projects +✅ allows a single non-root project +✅ allows a single non-root project +✅ correctly runs a single non-root project +✅ correctly runs a single non-root project +✅ projects can be workspaces with non-JS/JSON files +✅ objects in project configuration +✅ allows a single project +✅ resolves projects and their properly +✅ Does transform files with the corresponding project transformer +doesn't bleed module file extensions resolution with multiple workers + ✅ external config files + ✅ inline config files +``` +### ✅ e2e/__tests__/nativeAsyncMock.test.ts +``` +✅ mocks async functions +``` +### ✅ e2e/__tests__/nativeEsm.test.ts +``` +✅ test config is without transform +on node ^12.16.0 || >=13.7.0 + ✅ runs test with native ESM +on node >=14.3.0 + ⚪ supports top-level await +``` +### ✅ e2e/__tests__/nativeEsmTypescript.test.ts +``` +on node ^12.16.0 || >=13.7.0 + ✅ runs TS test with native ESM +``` +### ✅ e2e/__tests__/nestedEventLoop.test.ts +``` +✅ works with nested event loops +``` +### ✅ e2e/__tests__/nestedTestDefinitions.test.ts +``` +✅ print correct error message with nested test definitions outside describe +✅ print correct error message with nested test definitions inside describe +✅ print correct message when nesting describe inside it +✅ print correct message when nesting a hook inside it +``` +### ✅ e2e/__tests__/nodePath.test.ts +``` +✅ supports NODE_PATH +``` +### ✅ e2e/__tests__/noTestFound.test.ts +``` +Coverage Report + ✅ outputs coverage report +File path not found in mulit-project scenario + ✅ outputs coverage report +``` +### ✅ e2e/__tests__/noTestsFound.test.ts +``` +No tests are found + ✅ fails the test suite in standard situation + ✅ doesn't fail the test suite if --passWithNoTests passed + ✅ doesn't fail the test suite if using --lastCommit + ✅ doesn't fail the test suite if using --onlyChanged + ✅ doesn't fail the test suite if using --findRelatedTests +``` +### ❌ e2e/__tests__/onlyChanged.test.ts +``` +✅ run for "onlyChanged" and "changedSince" +✅ run only changed files +✅ report test coverage for only changed files +✅ report test coverage of source on test file change under only changed files +✅ do not pickup non-tested files when reporting coverage on only changed files +✅ collect test coverage when using onlyChanged +✅ onlyChanged in config is overwritten by --all or testPathPattern ❌ gets changed files for hg Error: expect(received).toMatch(expected) -✔️ path on Windows is case-insensitive +✅ path on Windows is case-insensitive +``` +### ✅ e2e/__tests__/onlyFailuresNonWatch.test.ts +``` +✅ onlyFailures flag works in non-watch mode +``` +### ✅ e2e/__tests__/overrideGlobals.test.ts +``` +✅ overriding native promise does not freeze Jest +✅ has a duration even if time is faked +``` +### ✅ e2e/__tests__/pnp.test.ts +``` +✅ successfully runs the tests inside `pnp/` +``` +### ✅ e2e/__tests__/presets.test.ts +``` +✅ supports json preset +✅ supports js preset +``` +### ✅ e2e/__tests__/processExit.test.ts +``` +✅ prints stack trace pointing to process.exit call +``` +### ✅ e2e/__tests__/promiseReject.test.ts +``` +✅ +``` +### ✅ e2e/__tests__/regexCharInPath.test.ts +``` +Regex Char In Path + ✅ parses paths containing regex chars correctly +``` +### ✅ e2e/__tests__/requireAfterTeardown.test.ts +``` +✅ prints useful error for requires after test is done +``` +### ✅ e2e/__tests__/requireMain.test.ts +``` +✅ provides `require.main` set to test suite module +``` +### ✅ e2e/__tests__/requireMainAfterCreateRequire.test.ts +``` +on node >=12.2.0 + ✅ `require.main` not undefined after createRequire +``` +### ✅ e2e/__tests__/requireMainIsolateModules.test.ts +``` +✅ `require.main` on using `jest.isolateModules` should not be undefined +``` +### ✅ e2e/__tests__/requireMainResetModules.test.ts +``` +✅ `require.main` on using `--resetModules='true'` should not be undefined +✅ `require.main` on using `jest.resetModules()` should not be undefined +``` +### ✅ e2e/__tests__/requireV8Module.test.ts +``` +✅ v8 module +``` +### ✅ e2e/__tests__/resetModules.test.ts +``` +✅ jest.resetModules should not error when _isMockFunction is defined but not boolean +``` +### ✅ e2e/__tests__/resolve.test.ts +``` +✅ resolve platform modules +``` +### ✅ e2e/__tests__/resolveGetPaths.test.ts +``` +✅ require.resolve.paths +``` +### ✅ e2e/__tests__/resolveNodeModule.test.ts +``` +✅ resolve node module +``` +### ✅ e2e/__tests__/resolveNoFileExtensions.test.ts +``` +✅ show error message with matching files +✅ show error message when no js moduleFileExtensions +``` +### ✅ e2e/__tests__/resolveWithPaths.test.ts +``` +✅ require.resolve with paths +``` +### ✅ e2e/__tests__/runProgrammatically.test.ts +``` +✅ run Jest programmatically cjs +✅ run Jest programmatically esm +``` +### ✅ e2e/__tests__/runTestsByPath.test.ts +``` +✅ runs tests by exact path +``` +### ✅ e2e/__tests__/runtimeInternalModuleRegistry.test.ts +``` +Runtime Internal Module Registry + ✅ correctly makes use of internal module registry when requiring modules +``` +### ✅ e2e/__tests__/selectProjects.test.ts +``` +Given a config with two named projects, first-project and second-project when Jest is started with `--selectProjects first-project` + ✅ runs the tests in the first project only + ✅ prints that only first-project will run +Given a config with two named projects, first-project and second-project when Jest is started with `--selectProjects second-project` + ✅ runs the tests in the second project only + ✅ prints that only second-project will run +Given a config with two named projects, first-project and second-project when Jest is started with `--selectProjects first-project second-project` + ✅ runs the tests in the first and second projects + ✅ prints that both first-project and second-project will run +Given a config with two named projects, first-project and second-project when Jest is started without providing `--selectProjects` + ✅ runs the tests in the first and second projects + ✅ does not print which projects are run +Given a config with two named projects, first-project and second-project when Jest is started with `--selectProjects third-project` + ✅ fails + ✅ prints that no project was found +Given a config with two projects, first-project and an unnamed project when Jest is started with `--selectProjects first-project` + ✅ runs the tests in the first project only + ✅ prints that a project does not have a name + ✅ prints that only first-project will run +Given a config with two projects, first-project and an unnamed project when Jest is started without providing `--selectProjects` + ✅ runs the tests in the first and second projects + ✅ does not print that a project has no name +Given a config with two projects, first-project and an unnamed project when Jest is started with `--selectProjects third-project` + ✅ fails + ✅ prints that a project does not have a name + ✅ prints that no project was found +``` +### ✅ e2e/__tests__/setImmediate.test.ts +``` +✅ setImmediate +``` +### ✅ e2e/__tests__/setupFilesAfterEnvConfig.test.ts +``` +setupFilesAfterEnv + ✅ requires multiple setup files before each file in the suite + ✅ requires setup files *after* the test runners are required +``` +### ✅ e2e/__tests__/showConfig.test.ts +``` +✅ --showConfig outputs config info and exits +``` +### ✅ e2e/__tests__/skipBeforeAfterAll.test.ts +``` +✅ correctly skip `beforeAll`s in skipped tests +``` +### ✅ e2e/__tests__/snapshot-unknown.test.ts +``` +Snapshot serializers + ✅ renders snapshot +``` +### ✅ e2e/__tests__/snapshot.test.ts +``` +Snapshot + ✅ stores new snapshots on the first run + ✅ works with escaped characters + ✅ works with escaped regex + ✅ works with template literal substitutions +Snapshot Validation + ✅ does not save snapshots in CI mode by default + ✅ works on subsequent runs without `-u` + ✅ deletes the snapshot if the test suite has been removed + ✅ deletes a snapshot when a test does removes all the snapshots + ✅ updates the snapshot when a test removes some snapshots +``` +### ✅ e2e/__tests__/snapshotMockFs.test.ts +``` +✅ store snapshot even if fs is mocked +``` +### ✅ e2e/__tests__/snapshotResolver.test.ts +``` +Custom snapshot resolver + ✅ Resolves snapshot files using custom resolver +``` +### ✅ e2e/__tests__/snapshotSerializers.test.ts +``` +Snapshot serializers + ✅ renders snapshot + ✅ compares snapshots correctly +``` +### ✅ e2e/__tests__/stackTrace.test.ts +``` +Stack Trace + ✅ prints a stack trace for runtime errors + ✅ does not print a stack trace for runtime errors when --noStackTrace is given + ✅ prints a stack trace for matching errors + ✅ does not print a stack trace for matching errors when --noStackTrace is given + ✅ prints a stack trace for errors + ✅ prints a stack trace for errors without message in stack trace + ✅ does not print a stack trace for errors when --noStackTrace is given +``` +### ✅ e2e/__tests__/stackTraceNoCaptureStackTrace.test.ts +``` +✅ prints a usable stack trace even if no Error.captureStackTrace +``` +### ✅ e2e/__tests__/stackTraceSourceMaps.test.ts +``` +✅ processes stack traces and code frames with source maps +``` +### ✅ e2e/__tests__/stackTraceSourceMapsWithCoverage.test.ts +``` +✅ processes stack traces and code frames with source maps with coverage +``` +### ✅ e2e/__tests__/supportsDashedArgs.ts +``` +✅ works with passing tests +✅ throws error for unknown dashed & camelcase args +``` +### ✅ e2e/__tests__/symbol.test.ts +``` +✅ Symbol deletion +``` +### ✅ e2e/__tests__/testEnvironment.test.ts +``` +✅ respects testEnvironment docblock +``` +### ✅ e2e/__tests__/testEnvironmentAsync.test.ts +``` +✅ triggers setup/teardown hooks +``` +### ✅ e2e/__tests__/testEnvironmentCircus.test.ts +``` +✅ calls testEnvironment handleTestEvent +``` +### ✅ e2e/__tests__/testEnvironmentCircusAsync.test.ts +``` +✅ calls asynchronous handleTestEvent in testEnvironment +``` +### ✅ e2e/__tests__/testFailureExitCode.test.ts +``` +✅ exits with a specified code when test fail +✅ exits with a specified code when bailing from a failed test +``` +### ✅ e2e/__tests__/testInRoot.test.ts +``` +✅ runs tests in only test.js and spec.js +``` +### ✅ e2e/__tests__/testNamePattern.test.ts +``` +✅ testNamePattern +``` +### ✅ e2e/__tests__/testNamePatternSkipped.test.ts +``` +✅ testNamePattern skipped +``` +### ✅ e2e/__tests__/testPathPatternReporterMessage.test.ts +``` +✅ prints a message with path pattern at the end +``` +### ✅ e2e/__tests__/testResultsProcessor.test.ts +``` +✅ testNamePattern +``` +### ✅ e2e/__tests__/testRetries.test.ts +``` +Test Retries + ✅ retries failed tests + ✅ reporter shows more than 1 invocation if test is retried + ✅ reporter shows 1 invocation if tests are not retried + ✅ tests are not retried if beforeAll hook failure occurs +``` +### ✅ e2e/__tests__/testTodo.test.ts +``` +✅ works with all statuses +✅ shows error messages when called with no arguments +✅ shows error messages when called with multiple arguments +✅ shows error messages when called with invalid argument +✅ shows todo messages when in verbose mode +``` +### ✅ e2e/__tests__/timeouts.test.ts +``` +✅ exceeds the timeout +✅ does not exceed the timeout +✅ exceeds the command line testTimeout +✅ does not exceed the command line testTimeout +``` +### ✅ e2e/__tests__/timeoutsLegacy.test.ts +``` +✅ does not work on jest-circus +⚪ exceeds the timeout set using jasmine.DEFAULT_TIMEOUT_INTERVAL +⚪ does not exceed the timeout using jasmine.DEFAULT_TIMEOUT_INTERVAL +⚪ can read and write jasmine.DEFAULT_TIMEOUT_INTERVAL +``` +### ✅ e2e/__tests__/timerResetMocks.test.ts +``` +✅ run timers after resetAllMocks test +✅ run timers with resetMocks in config test +``` +### ✅ e2e/__tests__/timerUseRealTimers.test.ts +``` +✅ useRealTimers cancels "timers": "fake" for whole test file +``` +### ✅ e2e/__tests__/toMatchInlineSnapshot.test.ts +``` +✅ basic support +✅ do not indent empty lines +✅ handles property matchers +✅ removes obsolete external snapshots +✅ supports async matchers +✅ supports async tests +✅ writes snapshots with non-literals in expect(...) +✅ handles mocking native modules prettier relies on +✅ supports custom matchers +✅ supports custom matchers with property matcher +✅ multiple custom matchers and native matchers +✅ indentation is correct in the presences of existing snapshots +``` +### ✅ e2e/__tests__/toMatchInlineSnapshotWithRetries.test.ts +``` +✅ works with a single snapshot +✅ works when a different assertion is failing +✅ works when multiple tests have snapshots but only one of them failed multiple times +``` +### ✅ e2e/__tests__/toMatchSnapshot.test.ts +``` +✅ basic support +✅ error thrown before snapshot +✅ first snapshot fails, second passes +✅ does not mark snapshots as obsolete in skipped tests +✅ accepts custom snapshot name +✅ handles property matchers +✅ handles invalid property matchers +✅ handles property matchers with hint +✅ handles property matchers with deep properties +``` +### ✅ e2e/__tests__/toMatchSnapshotWithRetries.test.ts +``` +✅ works with a single snapshot +✅ works when multiple tests have snapshots but only one of them failed multiple times +``` +### ✅ e2e/__tests__/toMatchSnapshotWithStringSerializer.test.ts +``` +✅ empty external +✅ empty internal ci false +✅ undefined internal ci true +``` +### ✅ e2e/__tests__/toThrowErrorMatchingInlineSnapshot.test.ts +``` +✅ works fine when function throws error +✅ updates existing snapshot +✅ cannot be used with .not +✅ should support rejecting promises +``` +### ✅ e2e/__tests__/toThrowErrorMatchingSnapshot.test.ts +``` +✅ works fine when function throws error +✅ throws the error if tested function didn't throw error +✅ accepts custom snapshot name +✅ cannot be used with .not +✅ should support rejecting promises +``` +### ✅ e2e/__tests__/transform.test.ts +``` +babel-jest + ✅ runs transpiled code + ✅ instruments only specific files and collects coverage +babel-jest ignored + ✅ tells user to match ignored files +babel-jest with manual transformer + ✅ runs transpiled code +no babel-jest + ✅ fails with syntax error on flow types + ✅ instrumentation with no babel-jest +custom transformer + ✅ proprocesses files + ✅ instruments files +multiple-transformers + ✅ transforms dependencies using specific transformers +ecmascript-modules-support + ✅ runs transpiled code +transformer-config + ✅ runs transpiled code + ✅ instruments only specific files and collects coverage +transformer caching + ✅ does not rerun transform within worker +transform-environment + ✅ should transform the environment +transform-runner + ✅ should transform runner +transform-testrunner + ✅ should transform testRunner +``` +### ✅ e2e/__tests__/transformLinkedModules.test.ts +``` +✅ should transform linked modules +``` +### ✅ e2e/__tests__/typescriptCoverage.test.ts +``` +✅ instruments and collects coverage for typescript files +``` +### ✅ e2e/__tests__/unexpectedToken.test.ts +``` +✅ triggers unexpected token error message for non-JS assets +✅ triggers unexpected token error message for untranspiled node_modules +✅ does not trigger unexpected token error message for regular syntax errors +``` +### ✅ e2e/__tests__/useStderr.test.ts +``` +✅ no tests found message is redirected to stderr +``` +### ✅ e2e/__tests__/v8Coverage.test.ts +``` +✅ prints coverage with missing sourcemaps +✅ prints coverage with empty sourcemaps +``` +### ✅ e2e/__tests__/verbose.test.ts +``` +✅ Verbose Reporter +``` +### ✅ e2e/__tests__/version.test.ts +``` +✅ works with jest.config.js +``` +### ✅ e2e/__tests__/watchModeNoAccess.test.ts +``` +✅ does not re-run tests when only access time is modified +``` +### ✅ e2e/__tests__/watchModeOnlyFailed.test.ts +``` +✅ can press "f" to run only failed tests +``` +### ✅ e2e/__tests__/watchModePatterns.test.ts +``` +✅ can press "p" to filter by file name +✅ can press "t" to filter by test name +``` +### ✅ e2e/__tests__/watchModeUpdateSnapshot.test.ts +``` +✅ can press "u" to update snapshots +``` +### ✅ e2e/__tests__/workerForceExit.test.ts +``` +✅ prints a warning if a worker is force exited +✅ force exits a worker that fails to exit gracefully +``` +### ✅ e2e/__tests__/wrongEnv.test.ts +``` +Wrong globals for environment + ✅ print useful error for window + ✅ print useful error for document + ✅ print useful error for navigator + ✅ print useful error for unref + ✅ print useful error when it explodes during evaluation +``` +### ✅ e2e/custom-test-sequencer/a.test.js +``` +✅ a +``` +### ✅ e2e/custom-test-sequencer/b.test.js +``` +✅ b +``` +### ✅ e2e/custom-test-sequencer/c.test.js +``` +✅ c +``` +### ✅ e2e/custom-test-sequencer/d.test.js +``` +✅ d +``` +### ✅ e2e/custom-test-sequencer/e.test.js +``` +✅ e +``` +### ✅ e2e/test-in-root/spec.js +``` +✅ stub +``` +### ✅ e2e/test-in-root/test.js +``` +✅ stub +``` +### ✅ e2e/timer-reset-mocks/after-reset-all-mocks/timerAndMock.test.js +``` +timers + ✅ should work before calling resetAllMocks + ✅ should not break after calling resetAllMocks +``` +### ✅ e2e/timer-reset-mocks/with-reset-mocks/timerWithMock.test.js +``` +timers + ✅ should work before calling resetAllMocks +``` +### ✅ e2e/v8-coverage/empty-sourcemap/test.ts +``` +✅ dummy-test +``` +### ✅ examples/angular/app.component.spec.ts +``` +AppComponent + ✅ should create the app + ✅ should have as title 'angular' + ✅ should render title in a h1 tag +``` +### ✅ examples/angular/shared/data.service.spec.ts +``` +Service: DataService + ✅ should create service + ✅ should return the right title +``` +### ✅ examples/angular/shared/sub.service.spec.ts +``` +Service: SubService + ✅ should create service +``` +### ✅ examples/async/__tests__/user.test.js +``` +✅ works with resolves +✅ works with promises +✅ works with async/await +✅ works with async/await and resolves +✅ tests error with rejects +✅ tests error with promises +✅ tests error with async/await +✅ tests error with async/await and rejects +``` +### ✅ examples/automatic-mocks/__tests__/automock.test.js +``` +✅ if utils are mocked +✅ mocked implementation +``` +### ✅ examples/automatic-mocks/__tests__/createMockFromModule.test.js +``` +✅ implementation created by automock +✅ implementation created by jest.createMockFromModule +``` +### ✅ examples/automatic-mocks/__tests__/disableAutomocking.test.js +``` +✅ original implementation +``` +### ✅ examples/enzyme/__tests__/CheckboxWithLabel-test.js +``` +✅ CheckboxWithLabel changes the text after click +``` +### ✅ examples/getting-started/sum.test.js +``` +✅ adds 1 + 2 to equal 3 +``` +### ✅ examples/jquery/__tests__/display_user.test.js +``` +✅ displays a user after a click +``` +### ✅ examples/jquery/__tests__/fetch_current_user.test.js +``` +✅ calls into $.ajax with the correct params +✅ calls the callback when $.ajax requests are finished +``` +### ✅ examples/manual-mocks/__tests__/file_summarizer.test.js +``` +listFilesInDirectorySync + ✅ includes all files in the directory in the summary +``` +### ✅ examples/manual-mocks/__tests__/lodashMocking.test.js +``` +✅ if lodash head is mocked +``` +### ✅ examples/manual-mocks/__tests__/user.test.js +``` +✅ if orginal user model +``` +### ✅ examples/manual-mocks/__tests__/userMocked.test.js +``` +✅ if user model is mocked +``` +### ✅ examples/module-mock/__tests__/full_mock.js +``` +✅ does a full mock +``` +### ✅ examples/module-mock/__tests__/mock_per_test.js +``` +define mock per test + ✅ uses mocked module + ✅ uses actual module +``` +### ✅ examples/module-mock/__tests__/partial_mock.js +``` +✅ does a partial mock +``` +### ✅ examples/mongodb/__test__/db.test.js +``` +✅ should aggregate docs from collection +``` +### ✅ examples/react-native/__tests__/intro.test.js +``` +✅ renders correctly +✅ renders the ActivityIndicator component +✅ renders the TextInput component +✅ renders the FlatList component +``` +### ✅ examples/react-testing-library/__tests__/CheckboxWithLabel-test.js +``` +✅ CheckboxWithLabel changes the text after click +``` +### ✅ examples/react/__tests__/CheckboxWithLabel-test.js +``` +✅ CheckboxWithLabel changes the text after click +``` +### ✅ examples/snapshot/__tests__/clock.react.test.js +``` +✅ renders correctly +``` +### ✅ examples/snapshot/__tests__/link.react.test.js +``` +✅ renders correctly +✅ renders as an anchor when no page is set +✅ properly escapes quotes +✅ changes the class when hovered +``` +### ✅ examples/timer/__tests__/infinite_timer_game.test.js +``` +✅ schedules a 10-second timer after 1 second +``` +### ✅ examples/timer/__tests__/timer_game.test.js +``` +timerGame + ✅ waits 1 second before ending the game + ✅ calls the callback after 1 second via runAllTimers + ✅ calls the callback after 1 second via advanceTimersByTime +``` +### ✅ examples/typescript/__tests__/calc.test.ts +``` +calc - mocks + ✅ returns result from subtract + ✅ returns result from sum + ✅ adds last result to memory + ✅ subtracts last result to memory + ✅ clears the memory + ✅ throws an error when invalid Op is passed +``` +### ✅ examples/typescript/__tests__/CheckboxWithLabel-test.tsx +``` +✅ CheckboxWithLabel changes the text after click +``` +### ✅ examples/typescript/__tests__/sub-test.ts +``` +✅ subtracts 5 - 1 to equal 4 in TypeScript +``` +### ✅ examples/typescript/__tests__/sum-test.ts +``` +✅ adds 1 + 2 to equal 3 in TScript +✅ adds 1 + 2 to equal 3 in JavaScript +``` +### ✅ examples/typescript/__tests__/sum.test.js +``` +✅ adds 1 + 2 to equal 3 in Typescript +✅ adds 1 + 2 to equal 3 in JavaScript +``` +### ✅ packages/babel-jest/src/__tests__/index.ts +``` +✅ Returns source string with inline maps when no transformOptions is passed +✅ can pass null to createTransformer +caller option correctly merges from defaults and options + ✅ {"supportsDynamicImport":true,"supportsStaticESM":true} -> {"supportsDynamicImport":true,"supportsStaticESM":true} + ✅ {"supportsDynamicImport":false,"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false} + ✅ {"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false} + ✅ {"supportsDynamicImport":true} -> {"supportsDynamicImport":true,"supportsStaticESM":false} +``` +### ✅ packages/babel-plugin-jest-hoist/src/__tests__/hoistPlugin.test.ts +``` +babel-plugin-jest-hoist + ✅ automatic react runtime + ✅ top level mocking + ✅ within a block + ✅ within a block with no siblings +``` +### ✅ packages/diff-sequences/src/__tests__/index.property.test.ts +``` +✅ should be reflexive +✅ should find the same number of common items when switching the inputs +✅ should have at most the length of its inputs +✅ should have at most the same number of each character as its inputs +✅ should be a subsequence of its inputs +✅ should be no-op when passing common items +✅ should find the exact common items when one array is subarray of the other +``` +### ✅ packages/diff-sequences/src/__tests__/index.test.ts +``` +invalid arg length + ✅ is not a number + ✅ Infinity is not a safe integer + ✅ Not a Number is not a safe integer + ✅ MAX_SAFE_INTEGER + 1 is not a safe integer + ✅ MIN_SAFE_INTEGER - 1 is not a safe integer + ✅ is a negative integer +invalid arg callback + ✅ null is not a function + ✅ undefined is not a function +input callback encapsulates comparison zero and negative zero + ✅ are not common according to Object.is method + ✅ are common according to === operator +input callback encapsulates comparison Not a Number + ✅ is common according to Object.is method + ✅ is not common according to === operator +input callback encapsulates sequences + ✅ arrays of strings + ✅ string and array of strings + ✅ strings +no common items negative zero is equivalent to zero for length + ✅ of a + ✅ of b + ✅ of a and b +no common items + ✅ a empty and b empty + ✅ a empty and b non-empty + ✅ a non-empty and b empty +no common items a non-empty and b non-empty + ✅ baDeltaLength 0 even + ✅ baDeltaLength 1 odd + ✅ baDeltaLength 2 even + ✅ baDeltaLength 7 odd +only common items + ✅ length 1 + ✅ length 2 +all common items outside + ✅ preceding changes + ✅ following change + ✅ preceding and following changes in one sequence +some common items inside and outside + ✅ preceding changes adjacent to common in both sequences + ✅ following changes adjacent to common in both sequences +all common items inside non-recursive + ✅ move from start to end relative to change + ✅ move from start to end relative to common + ✅ move from start to end relative to change and common + ✅ reverse relative to change + ✅ preceding middle + ✅ following middle +all common items inside recursive + ✅ prev reverse at depth 1 and preceding at depth 2 + ✅ last forward at depth 1 and following at depth 2 + ✅ preceding at depth 2 and both at depth 3 of following + ✅ interleaved single change + ✅ interleaved double changes + ✅ optimization decreases iMaxF + ✅ optimization decreases iMaxR +common substrings + ✅ progress + ✅ regression + ✅ wrapping +``` +### ✅ packages/expect/src/__tests__/assertionCounts.test.ts +``` +.assertions() + ✅ does not throw + ✅ redeclares different assertion count + ✅ expects no assertions +.hasAssertions() + ✅ does not throw if there is an assertion + ✅ throws if expected is not undefined + ✅ hasAssertions not leaking to global state +``` +### ✅ packages/expect/src/__tests__/asymmetricMatchers.test.ts +``` +✅ Any.asymmetricMatch() +✅ Any.toAsymmetricMatcher() +✅ Any.toAsymmetricMatcher() with function name +✅ Any throws when called with empty constructor +✅ Anything matches any type +✅ Anything does not match null and undefined +✅ Anything.toAsymmetricMatcher() +✅ ArrayContaining matches +✅ ArrayContaining does not match +✅ ArrayContaining throws for non-arrays +✅ ArrayNotContaining matches +✅ ArrayNotContaining does not match +✅ ArrayNotContaining throws for non-arrays +✅ ObjectContaining matches +✅ ObjectContaining does not match +✅ ObjectContaining matches defined properties +✅ ObjectContaining matches prototype properties +✅ ObjectContaining throws for non-objects +✅ ObjectContaining does not mutate the sample +✅ ObjectNotContaining matches +✅ ObjectNotContaining does not match +✅ ObjectNotContaining inverts ObjectContaining +✅ ObjectNotContaining throws for non-objects +✅ StringContaining matches string against string +✅ StringContaining throws if expected value is not string +✅ StringContaining returns false if received value is not string +✅ StringNotContaining matches string against string +✅ StringNotContaining throws if expected value is not string +✅ StringNotContaining returns true if received value is not string +✅ StringMatching matches string against regexp +✅ StringMatching matches string against string +✅ StringMatching throws if expected value is neither string nor regexp +✅ StringMatching returns false if received value is not string +✅ StringMatching returns false even if coerced non-string received value matches pattern +✅ StringNotMatching matches string against regexp +✅ StringNotMatching matches string against string +✅ StringNotMatching throws if expected value is neither string nor regexp +✅ StringNotMatching returns true if received value is not string +``` +### ✅ packages/expect/src/__tests__/extend.test.ts +``` +✅ is available globally when matcher is unary +✅ is available globally when matcher is variadic +✅ exposes matcherUtils in context +✅ is ok if there is no message specified +✅ exposes an equality function to custom matchers +✅ defines asymmetric unary matchers +✅ defines asymmetric unary matchers that can be prefixed by not +✅ defines asymmetric variadic matchers +✅ defines asymmetric variadic matchers that can be prefixed by not +✅ prints the Symbol into the error message +``` +### ✅ packages/expect/src/__tests__/isError.test.ts +``` +isError + ✅ should not assume objects are errors + ✅ should detect simple error instances + ✅ should detect errors from another context + ✅ should detect DOMException errors from another context +``` +### ✅ packages/expect/src/__tests__/matchers-toContain.property.test.ts +``` +toContain + ✅ should always find the value when inside the array + ✅ should not find the value if it has been cloned into the array +``` +### ✅ packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts +``` +toContainEqual + ✅ should always find the value when inside the array + ✅ should always find the value when cloned inside the array +``` +### ✅ packages/expect/src/__tests__/matchers-toEqual.property.test.ts +``` +toEqual + ✅ should be reflexive + ✅ should be symmetric +``` +### ✅ packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts +``` +toStrictEqual + ✅ should be reflexive + ✅ should be symmetric +toStrictEqual on node >=9 + ✅ should be equivalent to Node deepStrictEqual +``` +### ✅ packages/expect/src/__tests__/matchers.test.js +``` +✅ should throw if passed two arguments +.rejects + ✅ should reject + ✅ should reject with toThrow + ✅ should reject async function to toThrow + ✅ fails non-promise value "a" synchronously + ✅ fails non-promise value "a" + ✅ fails non-promise value [1] synchronously + ✅ fails non-promise value [1] + ✅ fails non-promise value [Function anonymous] synchronously + ✅ fails non-promise value [Function anonymous] + ✅ fails non-promise value {"a": 1} synchronously + ✅ fails non-promise value {"a": 1} + ✅ fails non-promise value 4 synchronously + ✅ fails non-promise value 4 + ✅ fails non-promise value null synchronously + ✅ fails non-promise value null + ✅ fails non-promise value true synchronously + ✅ fails non-promise value true + ✅ fails non-promise value undefined synchronously + ✅ fails non-promise value undefined + ✅ fails for promise that resolves +.resolves + ✅ should resolve + ✅ fails non-promise value "a" synchronously + ✅ fails non-promise value "a" + ✅ fails non-promise value [1] synchronously + ✅ fails non-promise value [1] + ✅ fails non-promise value [Function anonymous] synchronously + ✅ fails non-promise value [Function anonymous] + ✅ fails non-promise value {"a": 1} synchronously + ✅ fails non-promise value {"a": 1} + ✅ fails non-promise value 4 synchronously + ✅ fails non-promise value 4 + ✅ fails non-promise value null synchronously + ✅ fails non-promise value null + ✅ fails non-promise value true synchronously + ✅ fails non-promise value true + ✅ fails non-promise value undefined synchronously + ✅ fails non-promise value undefined + ✅ fails for promise that rejects +.toBe() + ✅ does not throw + ✅ fails for: 1 and 2 + ✅ fails for: true and false + ✅ fails for: [Function anonymous] and [Function anonymous] + ✅ fails for: {} and {} + ✅ fails for: {"a": 1} and {"a": 1} + ✅ fails for: {"a": 1} and {"a": 5} + ✅ fails for: {"a": [Function a], "b": 2} and {"a": Any, "b": 2} + ✅ fails for: {"a": undefined, "b": 2} and {"b": 2} + ✅ fails for: 2020-02-20T00:00:00.000Z and 2020-02-20T00:00:00.000Z + ✅ fails for: 2020-02-21T00:00:00.000Z and 2020-02-20T00:00:00.000Z + ✅ fails for: /received/ and /expected/ + ✅ fails for: Symbol(received) and Symbol(expected) + ✅ fails for: [Error: received] and [Error: expected] + ✅ fails for: "abc" and "cde" + ✅ fails for: "painless JavaScript testing" and "delightful JavaScript testing" + ✅ fails for: "" and "compare one-line string to empty string" + ✅ fails for: "with +trailing space" and "without trailing space" + ✅ fails for: "four +4 +line +string" and "3 +line +string" + ✅ fails for: [] and [] + ✅ fails for: null and undefined + ✅ fails for: -0 and 0 + ✅ fails for: 1n and 2n + ✅ fails for: {"a": 1n} and {"a": 1n} + ✅ fails for 'false' with '.not' + ✅ fails for '1' with '.not' + ✅ fails for '"a"' with '.not' + ✅ fails for 'undefined' with '.not' + ✅ fails for 'null' with '.not' + ✅ fails for '{}' with '.not' + ✅ fails for '[]' with '.not' + ✅ fails for '1n' with '.not' + ✅ fails for '1n' with '.not' + ✅ does not crash on circular references + ✅ assertion error matcherResult property contains matcher name, expected and actual values +.toStrictEqual() + ✅ does not ignore keys with undefined values + ✅ does not ignore keys with undefined values inside an array + ✅ does not ignore keys with undefined values deep inside an object + ✅ passes when comparing same type + ✅ matches the expected snapshot when it fails + ✅ displays substring diff + ✅ displays substring diff for multiple lines + ✅ does not pass for different types + ✅ does not simply compare constructor names + ✅ passes for matching sparse arrays + ✅ does not pass when sparseness of arrays do not match + ✅ does not pass when equally sparse arrays have different values +.toEqual() + ✅ {pass: false} expect(true).toEqual(false) + ✅ {pass: false} expect(1).toEqual(2) + ✅ {pass: false} expect(0).toEqual(-0) + ✅ {pass: false} expect(0).toEqual(5e-324) + ✅ {pass: false} expect(5e-324).toEqual(0) + ✅ {pass: false} expect(0).toEqual({}) + ✅ {pass: false} expect({}).toEqual(0) + ✅ {pass: false} expect({}).toEqual({}) + ✅ {pass: false} expect("abc").toEqual({"0": "a", "1": "b", "2": "c"}) + ✅ {pass: false} expect({"0": "a", "1": "b", "2": "c"}).toEqual("abc") + ✅ {pass: false} expect(/abc/gsy).toEqual(/abc/g) + ✅ {pass: false} expect({"a": 1}).toEqual({"a": 2}) + ✅ {pass: false} expect({"a": 5}).toEqual({"b": 6}) + ✅ {pass: false} expect({"foo": {"bar": 1}}).toEqual({"foo": {}}) + ✅ {pass: false} expect({"getterAndSetter": {}}).toEqual({"getterAndSetter": {"foo": "bar"}}) + ✅ {pass: false} expect({"frozenGetterAndSetter": {}}).toEqual({"frozenGetterAndSetter": {"foo": "bar"}}) + ✅ {pass: false} expect({"getter": {}}).toEqual({"getter": {"foo": "bar"}}) + ✅ {pass: false} expect({"frozenGetter": {}}).toEqual({"frozenGetter": {"foo": "bar"}}) + ✅ {pass: false} expect({"setter": undefined}).toEqual({"setter": {"foo": "bar"}}) + ✅ {pass: false} expect({"frozenSetter": undefined}).toEqual({"frozenSetter": {"foo": "bar"}}) + ✅ {pass: false} expect("banana").toEqual("apple") + ✅ {pass: false} expect("1 234,57 $").toEqual("1 234,57 $") + ✅ {pass: false} expect("type TypeName = T extends Function ? \"function\" : \"object\";").toEqual("type TypeName = T extends Function +? \"function\" +: \"object\";") + ✅ {pass: false} expect(null).toEqual(undefined) + ✅ {pass: false} expect([1]).toEqual([2]) + ✅ {pass: false} expect([1, 2]).toEqual([2, 1]) + ✅ {pass: false} expect(Immutable.List [1]).toEqual(Immutable.List [2]) + ✅ {pass: false} expect(Immutable.List [1, 2]).toEqual(Immutable.List [2, 1]) + ✅ {pass: false} expect(Map {}).toEqual(Set {}) + ✅ {pass: false} expect(Set {1, 2}).toEqual(Set {}) + ✅ {pass: false} expect(Set {1, 2}).toEqual(Set {1, 2, 3}) + ✅ {pass: false} expect(Set {[1], [2]}).toEqual(Set {[1], [2], [3]}) + ✅ {pass: false} expect(Set {[1], [2]}).toEqual(Set {[1], [2], [2]}) + ✅ {pass: false} expect(Set {Set {1}, Set {2}}).toEqual(Set {Set {1}, Set {3}}) + ✅ {pass: false} expect(Immutable.Set [1, 2]).toEqual(Immutable.Set []) + ✅ {pass: false} expect(Immutable.Set [1, 2]).toEqual(Immutable.Set [1, 2, 3]) + ✅ {pass: false} expect(Immutable.OrderedSet [1, 2]).toEqual(Immutable.OrderedSet [2, 1]) + ✅ {pass: false} expect(Map {1 => "one", 2 => "two"}).toEqual(Map {1 => "one"}) + ✅ {pass: false} expect(Map {"a" => 0}).toEqual(Map {"b" => 0}) + ✅ {pass: false} expect(Map {"v" => 1}).toEqual(Map {"v" => 2}) + ✅ {pass: false} expect(Map {["v"] => 1}).toEqual(Map {["v"] => 2}) + ✅ {pass: false} expect(Map {[1] => Map {[1] => "one"}}).toEqual(Map {[1] => Map {[1] => "two"}}) + ✅ {pass: false} expect(Immutable.Map {"a": 0}).toEqual(Immutable.Map {"b": 0}) + ✅ {pass: false} expect(Immutable.Map {"v": 1}).toEqual(Immutable.Map {"v": 2}) + ✅ {pass: false} expect(Immutable.OrderedMap {1: "one", 2: "two"}).toEqual(Immutable.OrderedMap {2: "two", 1: "one"}) + ✅ {pass: false} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 11}}}) + ✅ {pass: false} expect([97, 98, 99]).toEqual([97, 98, 100]) + ✅ {pass: false} expect({"a": 1, "b": 2}).toEqual(ObjectContaining {"a": 2}) + ✅ {pass: false} expect(false).toEqual(ObjectContaining {"a": 2}) + ✅ {pass: false} expect([1, 3]).toEqual(ArrayContaining [1, 2]) + ✅ {pass: false} expect(1).toEqual(ArrayContaining [1, 2]) + ✅ {pass: false} expect("abd").toEqual(StringContaining "bc") + ✅ {pass: false} expect("abd").toEqual(StringMatching /bc/i) + ✅ {pass: false} expect(undefined).toEqual(Anything) + ✅ {pass: false} expect(undefined).toEqual(Any) + ✅ {pass: false} expect("Eve").toEqual({"asymmetricMatch": [Function asymmetricMatch]}) + ✅ {pass: false} expect({"target": {"nodeType": 1, "value": "a"}}).toEqual({"target": {"nodeType": 1, "value": "b"}}) + ✅ {pass: false} expect({"nodeName": "div", "nodeType": 1}).toEqual({"nodeName": "p", "nodeType": 1}) + ✅ {pass: false} expect({Symbol(foo): 1, Symbol(bar): 2}).toEqual({Symbol(foo): Any, Symbol(bar): 1}) + ✅ {pass: false} expect(1n).toEqual(2n) + ✅ {pass: false} expect(1n).toEqual(1) + ✅ {pass: true} expect(true).not.toEqual(true) + ✅ {pass: true} expect(1).not.toEqual(1) + ✅ {pass: true} expect(NaN).not.toEqual(NaN) + ✅ {pass: true} expect(0).not.toEqual(0) + ✅ {pass: true} expect(0).not.toEqual(0) + ✅ {pass: true} expect({}).not.toEqual({}) + ✅ {pass: true} expect("abc").not.toEqual("abc") + ✅ {pass: true} expect("abc").not.toEqual("abc") + ✅ {pass: true} expect("abc").not.toEqual("abc") + ✅ {pass: true} expect([1]).not.toEqual([1]) + ✅ {pass: true} expect([1, 2]).not.toEqual([1, 2]) + ✅ {pass: true} expect(Immutable.List [1]).not.toEqual(Immutable.List [1]) + ✅ {pass: true} expect(Immutable.List [1, 2]).not.toEqual(Immutable.List [1, 2]) + ✅ {pass: true} expect({}).not.toEqual({}) + ✅ {pass: true} expect({"a": 99}).not.toEqual({"a": 99}) + ✅ {pass: true} expect(Set {}).not.toEqual(Set {}) + ✅ {pass: true} expect(Set {1, 2}).not.toEqual(Set {1, 2}) + ✅ {pass: true} expect(Set {1, 2}).not.toEqual(Set {2, 1}) + ✅ {pass: true} expect(Set {[1], [2]}).not.toEqual(Set {[2], [1]}) + ✅ {pass: true} expect(Set {Set {[1]}, Set {[2]}}).not.toEqual(Set {Set {[2]}, Set {[1]}}) + ✅ {pass: true} expect(Set {[1], [2], [3], [3]}).not.toEqual(Set {[3], [3], [2], [1]}) + ✅ {pass: true} expect(Set {{"a": 1}, {"b": 2}}).not.toEqual(Set {{"b": 2}, {"a": 1}}) + ✅ {pass: true} expect(Immutable.Set []).not.toEqual(Immutable.Set []) + ✅ {pass: true} expect(Immutable.Set [1, 2]).not.toEqual(Immutable.Set [1, 2]) + ✅ {pass: true} expect(Immutable.Set [1, 2]).not.toEqual(Immutable.Set [2, 1]) + ✅ {pass: true} expect(Immutable.OrderedSet []).not.toEqual(Immutable.OrderedSet []) + ✅ {pass: true} expect(Immutable.OrderedSet [1, 2]).not.toEqual(Immutable.OrderedSet [1, 2]) + ✅ {pass: true} expect(Map {}).not.toEqual(Map {}) + ✅ {pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {1 => "one", 2 => "two"}) + ✅ {pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {2 => "two", 1 => "one"}) + ✅ {pass: true} expect(Map {[1] => "one", [2] => "two", [3] => "three", [3] => "four"}).not.toEqual(Map {[3] => "three", [3] => "four", [2] => "two", [1] => "one"}) + ✅ {pass: true} expect(Map {[1] => Map {[1] => "one"}, [2] => Map {[2] => "two"}}).not.toEqual(Map {[2] => Map {[2] => "two"}, [1] => Map {[1] => "one"}}) + ✅ {pass: true} expect(Map {[1] => "one", [2] => "two"}).not.toEqual(Map {[2] => "two", [1] => "one"}) + ✅ {pass: true} expect(Map {{"a": 1} => "one", {"b": 2} => "two"}).not.toEqual(Map {{"b": 2} => "two", {"a": 1} => "one"}) + ✅ {pass: true} expect(Map {1 => ["one"], 2 => ["two"]}).not.toEqual(Map {2 => ["two"], 1 => ["one"]}) + ✅ {pass: true} expect(Immutable.Map {}).not.toEqual(Immutable.Map {}) + ✅ {pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {1: "one", 2: "two"}) + ✅ {pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {2: "two", 1: "one"}) + ✅ {pass: true} expect(Immutable.OrderedMap {1: "one", 2: "two"}).not.toEqual(Immutable.OrderedMap {1: "one", 2: "two"}) + ✅ {pass: true} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).not.toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}) + ✅ {pass: true} expect([97, 98, 99]).not.toEqual([97, 98, 99]) + ✅ {pass: true} expect({"a": 1, "b": 2}).not.toEqual(ObjectContaining {"a": 1}) + ✅ {pass: true} expect([1, 2, 3]).not.toEqual(ArrayContaining [2, 3]) + ✅ {pass: true} expect("abcd").not.toEqual(StringContaining "bc") + ✅ {pass: true} expect("abcd").not.toEqual(StringMatching /bc/) + ✅ {pass: true} expect(true).not.toEqual(Anything) + ✅ {pass: true} expect([Function anonymous]).not.toEqual(Any) + ✅ {pass: true} expect({"a": 1, "b": [Function b], "c": true}).not.toEqual({"a": 1, "b": Any, "c": Anything}) + ✅ {pass: true} expect("Alice").not.toEqual({"asymmetricMatch": [Function asymmetricMatch]}) + ✅ {pass: true} expect({"nodeName": "div", "nodeType": 1}).not.toEqual({"nodeName": "div", "nodeType": 1}) + ✅ {pass: true} expect({Symbol(foo): 1, Symbol(bar): 2}).not.toEqual({Symbol(foo): Any, Symbol(bar): 2}) + ✅ {pass: true} expect(1n).not.toEqual(1n) + ✅ {pass: true} expect(0n).not.toEqual(0n) + ✅ {pass: true} expect([1n]).not.toEqual([1n]) + ✅ {pass: true} expect([1n, 2]).not.toEqual([1n, 2]) + ✅ {pass: true} expect(Immutable.List [1n]).not.toEqual(Immutable.List [1n]) + ✅ {pass: true} expect({"a": 99n}).not.toEqual({"a": 99n}) + ✅ {pass: true} expect(Set {1n, 2n}).not.toEqual(Set {1n, 2n}) + ✅ assertion error matcherResult property contains matcher name, expected and actual values + ✅ symbol based keys in arrays are processed correctly + ✅ non-enumerable members should be skipped during equal + ✅ non-enumerable symbolic members should be skipped during equal +.toEqual() cyclic object equality + ✅ properties with the same circularity are equal + ✅ properties with different circularity are not equal + ✅ are not equal if circularity is not on the same property +.toBeInstanceOf() + ✅ passing Map {} and [Function Map] + ✅ passing [] and [Function Array] + ✅ passing {} and [Function A] + ✅ passing {} and [Function B] + ✅ passing {} and [Function B] + ✅ passing {} and [Function anonymous] + ✅ passing {} and [Function B] + ✅ passing {} and [Function name() {}] + ✅ failing "a" and [Function String] + ✅ failing 1 and [Function Number] + ✅ failing true and [Function Boolean] + ✅ failing {} and [Function B] + ✅ failing {} and [Function A] + ✅ failing undefined and [Function String] + ✅ failing null and [Function String] + ✅ failing /\w+/ and [Function anonymous] + ✅ failing {} and [Function RegExp] + ✅ throws if constructor is not a function +.toBeTruthy(), .toBeFalsy() + ✅ does not accept arguments + ✅ '{}' is truthy + ✅ '[]' is truthy + ✅ 'true' is truthy + ✅ '1' is truthy + ✅ '"a"' is truthy + ✅ '0.5' is truthy + ✅ 'Map {}' is truthy + ✅ '[Function anonymous]' is truthy + ✅ 'Infinity' is truthy + ✅ '1n' is truthy + ✅ 'false' is falsy + ✅ 'null' is falsy + ✅ 'NaN' is falsy + ✅ '0' is falsy + ✅ '""' is falsy + ✅ 'undefined' is falsy + ✅ '0n' is falsy +.toBeNaN() + ✅ {pass: true} expect(NaN).toBeNaN() + ✅ throws +.toBeNull() + ✅ fails for '{}' + ✅ fails for '[]' + ✅ fails for 'true' + ✅ fails for '1' + ✅ fails for '"a"' + ✅ fails for '0.5' + ✅ fails for 'Map {}' + ✅ fails for '[Function anonymous]' + ✅ fails for 'Infinity' + ✅ fails for null with .not + ✅ pass for null +.toBeDefined(), .toBeUndefined() + ✅ '{}' is defined + ✅ '[]' is defined + ✅ 'true' is defined + ✅ '1' is defined + ✅ '"a"' is defined + ✅ '0.5' is defined + ✅ 'Map {}' is defined + ✅ '[Function anonymous]' is defined + ✅ 'Infinity' is defined + ✅ '1n' is defined + ✅ undefined is undefined +.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() + ✅ {pass: true} expect(1).toBeLessThan(2) + ✅ {pass: false} expect(2).toBeLessThan(1) + ✅ {pass: true} expect(2).toBeGreaterThan(1) + ✅ {pass: false} expect(1).toBeGreaterThan(2) + ✅ {pass: true} expect(1).toBeLessThanOrEqual(2) + ✅ {pass: false} expect(2).toBeLessThanOrEqual(1) + ✅ {pass: true} expect(2).toBeGreaterThanOrEqual(1) + ✅ {pass: false} expect(1).toBeGreaterThanOrEqual(2) + ✅ throws: [1, 2] + ✅ {pass: true} expect(-Infinity).toBeLessThan(Infinity) + ✅ {pass: false} expect(Infinity).toBeLessThan(-Infinity) + ✅ {pass: true} expect(Infinity).toBeGreaterThan(-Infinity) + ✅ {pass: false} expect(-Infinity).toBeGreaterThan(Infinity) + ✅ {pass: true} expect(-Infinity).toBeLessThanOrEqual(Infinity) + ✅ {pass: false} expect(Infinity).toBeLessThanOrEqual(-Infinity) + ✅ {pass: true} expect(Infinity).toBeGreaterThanOrEqual(-Infinity) + ✅ {pass: false} expect(-Infinity).toBeGreaterThanOrEqual(Infinity) + ✅ throws: [-Infinity, Infinity] + ✅ {pass: true} expect(5e-324).toBeLessThan(1.7976931348623157e+308) + ✅ {pass: false} expect(1.7976931348623157e+308).toBeLessThan(5e-324) + ✅ {pass: true} expect(1.7976931348623157e+308).toBeGreaterThan(5e-324) + ✅ {pass: false} expect(5e-324).toBeGreaterThan(1.7976931348623157e+308) + ✅ {pass: true} expect(5e-324).toBeLessThanOrEqual(1.7976931348623157e+308) + ✅ {pass: false} expect(1.7976931348623157e+308).toBeLessThanOrEqual(5e-324) + ✅ {pass: true} expect(1.7976931348623157e+308).toBeGreaterThanOrEqual(5e-324) + ✅ {pass: false} expect(5e-324).toBeGreaterThanOrEqual(1.7976931348623157e+308) + ✅ throws: [5e-324, 1.7976931348623157e+308] + ✅ {pass: true} expect(17).toBeLessThan(34) + ✅ {pass: false} expect(34).toBeLessThan(17) + ✅ {pass: true} expect(34).toBeGreaterThan(17) + ✅ {pass: false} expect(17).toBeGreaterThan(34) + ✅ {pass: true} expect(17).toBeLessThanOrEqual(34) + ✅ {pass: false} expect(34).toBeLessThanOrEqual(17) + ✅ {pass: true} expect(34).toBeGreaterThanOrEqual(17) + ✅ {pass: false} expect(17).toBeGreaterThanOrEqual(34) + ✅ throws: [17, 34] + ✅ {pass: true} expect(3).toBeLessThan(7) + ✅ {pass: false} expect(7).toBeLessThan(3) + ✅ {pass: true} expect(7).toBeGreaterThan(3) + ✅ {pass: false} expect(3).toBeGreaterThan(7) + ✅ {pass: true} expect(3).toBeLessThanOrEqual(7) + ✅ {pass: false} expect(7).toBeLessThanOrEqual(3) + ✅ {pass: true} expect(7).toBeGreaterThanOrEqual(3) + ✅ {pass: false} expect(3).toBeGreaterThanOrEqual(7) + ✅ throws: [3, 7] + ✅ {pass: true} expect(9).toBeLessThan(18) + ✅ {pass: false} expect(18).toBeLessThan(9) + ✅ {pass: true} expect(18).toBeGreaterThan(9) + ✅ {pass: false} expect(9).toBeGreaterThan(18) + ✅ {pass: true} expect(9).toBeLessThanOrEqual(18) + ✅ {pass: false} expect(18).toBeLessThanOrEqual(9) + ✅ {pass: true} expect(18).toBeGreaterThanOrEqual(9) + ✅ {pass: false} expect(9).toBeGreaterThanOrEqual(18) + ✅ throws: [9, 18] + ✅ {pass: true} expect(0.1).toBeLessThan(0.2) + ✅ {pass: false} expect(0.2).toBeLessThan(0.1) + ✅ {pass: true} expect(0.2).toBeGreaterThan(0.1) + ✅ {pass: false} expect(0.1).toBeGreaterThan(0.2) + ✅ {pass: true} expect(0.1).toBeLessThanOrEqual(0.2) + ✅ {pass: false} expect(0.2).toBeLessThanOrEqual(0.1) + ✅ {pass: true} expect(0.2).toBeGreaterThanOrEqual(0.1) + ✅ {pass: false} expect(0.1).toBeGreaterThanOrEqual(0.2) + ✅ throws: [0.1, 0.2] + ✅ can compare BigInt to Numbers + ✅ {pass: true} expect(1n).toBeLessThan(2n) + ✅ {pass: false} expect(2n).toBeLessThan(1n) + ✅ {pass: true} expect(2n).toBeGreaterThan(1n) + ✅ {pass: false} expect(1n).toBeGreaterThan(2n) + ✅ {pass: true} expect(1n).toBeLessThanOrEqual(2n) + ✅ {pass: false} expect(2n).toBeLessThanOrEqual(1n) + ✅ {pass: true} expect(2n).toBeGreaterThanOrEqual(1n) + ✅ {pass: false} expect(1n).toBeGreaterThanOrEqual(2n) + ✅ throws: [1n, 2n] + ✅ {pass: true} expect(17n).toBeLessThan(34n) + ✅ {pass: false} expect(34n).toBeLessThan(17n) + ✅ {pass: true} expect(34n).toBeGreaterThan(17n) + ✅ {pass: false} expect(17n).toBeGreaterThan(34n) + ✅ {pass: true} expect(17n).toBeLessThanOrEqual(34n) + ✅ {pass: false} expect(34n).toBeLessThanOrEqual(17n) + ✅ {pass: true} expect(34n).toBeGreaterThanOrEqual(17n) + ✅ {pass: false} expect(17n).toBeGreaterThanOrEqual(34n) + ✅ throws: [17n, 34n] + ✅ {pass: true} expect(-1).toBeLessThan(2n) + ✅ {pass: false} expect(2n).toBeLessThan(-1) + ✅ {pass: true} expect(2n).toBeGreaterThan(-1) + ✅ {pass: false} expect(-1).toBeGreaterThan(2n) + ✅ {pass: true} expect(-1).toBeLessThanOrEqual(2n) + ✅ {pass: false} expect(2n).toBeLessThanOrEqual(-1) + ✅ {pass: true} expect(2n).toBeGreaterThanOrEqual(-1) + ✅ {pass: false} expect(-1).toBeGreaterThanOrEqual(2n) + ✅ throws: [-1, 2n] + ✅ equal numbers: [1, 1] + ✅ equal numbers: [5e-324, 5e-324] + ✅ equal numbers: [1.7976931348623157e+308, 1.7976931348623157e+308] + ✅ equal numbers: [Infinity, Infinity] + ✅ equal numbers: [-Infinity, -Infinity] + ✅ equal numbers: [1, 1] + ✅ equal numbers: [9007199254740991, 9007199254740991] +.toContain(), .toContainEqual() + ✅ iterable + ✅ '[1, 2, 3, 4]' contains '1' + ✅ '["a", "b", "c", "d"]' contains '"a"' + ✅ '[undefined, null]' contains 'null' + ✅ '[undefined, null]' contains 'undefined' + ✅ '[Symbol(a)]' contains 'Symbol(a)' + ✅ '"abcdef"' contains '"abc"' + ✅ '"11112111"' contains '"2"' + ✅ 'Set {"abc", "def"}' contains '"abc"' + ✅ '[0, 1]' contains '1' + ✅ '[1n, 2n, 3n, 4n]' contains '1n' + ✅ '[1, 2, 3, 3n, 4]' contains '3n' + ✅ '[1, 2, 3]' does not contain '4' + ✅ '[null, undefined]' does not contain '1' + ✅ '[{}, []]' does not contain '[]' + ✅ '[{}, []]' does not contain '{}' + ✅ '[1n, 2n, 3n]' does not contain '3' + ✅ error cases + ✅ '[1, 2, 3, 4]' contains a value equal to '1' + ✅ '["a", "b", "c", "d"]' contains a value equal to '"a"' + ✅ '[undefined, null]' contains a value equal to 'null' + ✅ '[undefined, null]' contains a value equal to 'undefined' + ✅ '[Symbol(a)]' contains a value equal to 'Symbol(a)' + ✅ '[{"a": "b"}, {"a": "c"}]' contains a value equal to '{"a": "b"}' + ✅ 'Set {1, 2, 3, 4}' contains a value equal to '1' + ✅ '[0, 1]' contains a value equal to '1' + ✅ '[{"a": "b"}, {"a": "c"}]' does not contain a value equal to'{"a": "d"}' + ✅ error cases for toContainEqual +.toBeCloseTo + ✅ {pass: true} expect(0).toBeCloseTo(0) + ✅ {pass: true} expect(0).toBeCloseTo(0.001) + ✅ {pass: true} expect(1.23).toBeCloseTo(1.229) + ✅ {pass: true} expect(1.23).toBeCloseTo(1.226) + ✅ {pass: true} expect(1.23).toBeCloseTo(1.225) + ✅ {pass: true} expect(1.23).toBeCloseTo(1.234) + ✅ {pass: true} expect(Infinity).toBeCloseTo(Infinity) + ✅ {pass: true} expect(-Infinity).toBeCloseTo(-Infinity) + ✅ {pass: false} expect(0).toBeCloseTo(0.01) + ✅ {pass: false} expect(1).toBeCloseTo(1.23) + ✅ {pass: false} expect(1.23).toBeCloseTo(1.2249999) + ✅ {pass: false} expect(Infinity).toBeCloseTo(-Infinity) + ✅ {pass: false} expect(Infinity).toBeCloseTo(1.23) + ✅ {pass: false} expect(-Infinity).toBeCloseTo(-1.23) + ✅ {pass: false} expect(3.141592e-7).toBeCloseTo(3e-7, 8) + ✅ {pass: false} expect(56789).toBeCloseTo(51234, -4) + ✅ {pass: true} expect(0).toBeCloseTo(0.1, 0) + ✅ {pass: true} expect(0).toBeCloseTo(0.0001, 3) + ✅ {pass: true} expect(0).toBeCloseTo(0.000004, 5) + ✅ {pass: true} expect(2.0000002).toBeCloseTo(2, 5) +.toBeCloseTo throws: Matcher error + ✅ promise empty isNot false received + ✅ promise empty isNot true expected + ✅ promise rejects isNot false expected + ✅ promise rejects isNot true received + ✅ promise resolves isNot false received + ✅ promise resolves isNot true expected +.toMatch() + ✅ {pass: true} expect(foo).toMatch(foo) + ✅ {pass: true} expect(Foo bar).toMatch(/^foo/i) + ✅ throws: [bar, foo] + ✅ throws: [bar, /foo/] + ✅ throws if non String actual value passed: [1, "foo"] + ✅ throws if non String actual value passed: [{}, "foo"] + ✅ throws if non String actual value passed: [[], "foo"] + ✅ throws if non String actual value passed: [true, "foo"] + ✅ throws if non String actual value passed: [/foo/i, "foo"] + ✅ throws if non String actual value passed: [[Function anonymous], "foo"] + ✅ throws if non String actual value passed: [undefined, "foo"] + ✅ throws if non String/RegExp expected value passed: ["foo", 1] + ✅ throws if non String/RegExp expected value passed: ["foo", {}] + ✅ throws if non String/RegExp expected value passed: ["foo", []] + ✅ throws if non String/RegExp expected value passed: ["foo", true] + ✅ throws if non String/RegExp expected value passed: ["foo", [Function anonymous]] + ✅ throws if non String/RegExp expected value passed: ["foo", undefined] + ✅ escapes strings properly + ✅ does not maintain RegExp state between calls +.toHaveLength + ✅ {pass: true} expect([1, 2]).toHaveLength(2) + ✅ {pass: true} expect([]).toHaveLength(0) + ✅ {pass: true} expect(["a", "b"]).toHaveLength(2) + ✅ {pass: true} expect("abc").toHaveLength(3) + ✅ {pass: true} expect("").toHaveLength(0) + ✅ {pass: true} expect([Function anonymous]).toHaveLength(0) + ✅ {pass: false} expect([1, 2]).toHaveLength(3) + ✅ {pass: false} expect([]).toHaveLength(1) + ✅ {pass: false} expect(["a", "b"]).toHaveLength(99) + ✅ {pass: false} expect("abc").toHaveLength(66) + ✅ {pass: false} expect("").toHaveLength(1) + ✅ error cases +.toHaveLength matcher error expected length + ✅ not number + ✅ number Infinity + ✅ number NaN + ✅ number float + ✅ number negative integer +.toHaveProperty() + ✅ {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 1) + ✅ {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 1) + ✅ {pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 1) + ✅ {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', 2) + ✅ {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', Any) + ✅ {pass: true} expect({"a": 0}).toHaveProperty('a', 0) + ✅ {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b', undefined) + ✅ {pass: true} expect({"a": {}}).toHaveProperty('a.b', undefined) + ✅ {pass: true} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 5}) + ✅ {pass: true} expect({"property": 1}).toHaveProperty('property', 1) + ✅ {pass: true} expect({}).toHaveProperty('a', undefined) + ✅ {pass: true} expect({}).toHaveProperty('b', "b") + ✅ {pass: true} expect({}).toHaveProperty('setter', undefined) + ✅ {pass: true} expect({"val": true}).toHaveProperty('a', undefined) + ✅ {pass: true} expect({"val": true}).toHaveProperty('c', "c") + ✅ {pass: true} expect({"val": true}).toHaveProperty('val', true) + ✅ {pass: true} expect({"nodeName": "DIV"}).toHaveProperty('nodeType', 1) + ✅ {pass: true} expect("").toHaveProperty('length', 0) + ✅ {pass: true} expect([Function memoized]).toHaveProperty('memo', []) + ✅ {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.ttt.d', 1) + ✅ {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 2) + ✅ {pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2) + ✅ {pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2) + ✅ {pass: false} expect({"children": ["\"That cartoon\""], "props": null, "type": "p"}).toHaveProperty('children,0', "\"That cat cartoon\"") + ✅ {pass: false} expect({"children": ["Roses are red. +Violets are blue. +Testing with Jest is good for you."], "props": null, "type": "pre"}).toHaveProperty('children,0', "Roses are red, violets are blue. +Testing with Jest +Is good for you.") + ✅ {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 2) + ✅ {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d', 1) + ✅ {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d', 5) + ✅ {pass: false} expect({}).toHaveProperty('a', "test") + ✅ {pass: false} expect({"a": {"b": 3}}).toHaveProperty('a.b', undefined) + ✅ {pass: false} expect(1).toHaveProperty('a.b.c', "test") + ✅ {pass: false} expect("abc").toHaveProperty('a.b.c', {"a": 5}) + ✅ {pass: false} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 4}) + ✅ {pass: false} expect({}).toHaveProperty('a', "a") + ✅ {pass: false} expect({}).toHaveProperty('b', undefined) + ✅ {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d') + ✅ {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d') + ✅ {pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d') + ✅ {pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1') + ✅ {pass: true} expect({"a": 0}).toHaveProperty('a') + ✅ {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b') + ✅ {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d') + ✅ {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d') + ✅ {pass: false} expect({}).toHaveProperty('a') + ✅ {pass: false} expect(1).toHaveProperty('a.b.c') + ✅ {pass: false} expect("abc").toHaveProperty('a.b.c') + ✅ {pass: false} expect(false).toHaveProperty('key') + ✅ {pass: false} expect(0).toHaveProperty('key') + ✅ {pass: false} expect("").toHaveProperty('key') + ✅ {pass: false} expect(Symbol()).toHaveProperty('key') + ✅ {pass: false} expect({"key": 1}).toHaveProperty('not') + ✅ {error} expect(null).toHaveProperty('a.b') + ✅ {error} expect(undefined).toHaveProperty('a') + ✅ {error} expect({"a": {"b": {}}}).toHaveProperty('undefined') + ✅ {error} expect({"a": {"b": {}}}).toHaveProperty('null') + ✅ {error} expect({"a": {"b": {}}}).toHaveProperty('1') + ✅ {error} expect({}).toHaveProperty('') +toMatchObject() circular references simple circular references + ✅ {pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({}) + ✅ {pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "hello", "ref": [Circular]}) + ✅ {pass: false} expect({}).toMatchObject({"a": "hello", "ref": [Circular]}) + ✅ {pass: false} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "world", "ref": [Circular]}) + ✅ {pass: false} expect({"ref": "not a ref"}).toMatchObject({"a": "hello", "ref": [Circular]}) +toMatchObject() circular references transitive circular references + ✅ {pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({}) + ✅ {pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) + ✅ {pass: false} expect({}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) + ✅ {pass: false} expect({"a": "world", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) + ✅ {pass: false} expect({"nestedObj": {"parentObj": "not the parent ref"}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}}) +toMatchObject() + ✅ {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b"}) + ✅ {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b", "c": "d"}) + ✅ {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": "z"}}) + ✅ {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"x": {"r": "r"}}}) + ✅ {pass: true} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5]}) + ✅ {pass: true} expect({"a": [3, 4, 5, "v"], "b": "b"}).toMatchObject({"a": [3, 4, 5, "v"]}) + ✅ {pass: true} expect({"a": 1, "c": 2}).toMatchObject({"a": Any}) + ✅ {pass: true} expect({"a": {"x": "x", "y": "y"}}).toMatchObject({"a": {"x": Any}}) + ✅ {pass: true} expect(Set {1, 2}).toMatchObject(Set {1, 2}) + ✅ {pass: true} expect(Set {1, 2}).toMatchObject(Set {2, 1}) + ✅ {pass: true} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-11-30T00:00:00.000Z) + ✅ {pass: true} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-11-30T00:00:00.000Z}) + ✅ {pass: true} expect({"a": null, "b": "b"}).toMatchObject({"a": null}) + ✅ {pass: true} expect({"a": undefined, "b": "b"}).toMatchObject({"a": undefined}) + ✅ {pass: true} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "a"}]}) + ✅ {pass: true} expect([1, 2]).toMatchObject([1, 2]) + ✅ {pass: true} expect({"a": undefined}).toMatchObject({"a": undefined}) + ✅ {pass: true} expect([]).toMatchObject([]) + ✅ {pass: true} expect([Error: foo]).toMatchObject([Error: foo]) + ✅ {pass: true} expect([Error: bar]).toMatchObject({"message": "bar"}) + ✅ {pass: true} expect({}).toMatchObject({"a": undefined, "b": "b"}) + ✅ {pass: true} expect({"a": "b"}).toMatchObject({"a": "b"}) + ✅ {pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", Symbol(jest): "jest"}) + ✅ {pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", "c": "d", Symbol(jest): "jest"}) + ✅ {pass: true} expect({}).toMatchObject({"a": undefined, "b": "b", "c": "c"}) + ✅ {pass: true} expect({}).toMatchObject({"d": 4}) + ✅ {pass: true} expect({"a": "b", "toString": [Function toString]}).toMatchObject({"toString": Any}) + ✅ {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"e": "b"}) + ✅ {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b!", "c": "d"}) + ✅ {pass: false} expect({"a": "a", "c": "d"}).toMatchObject({"a": Any}) + ✅ {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": [3]}}) + ✅ {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"l": {"r": "r"}}}) + ✅ {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5, 6]}) + ✅ {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4]}) + ✅ {pass: false} expect({"a": [3, 4, "v"], "b": "b"}).toMatchObject({"a": ["v"]}) + ✅ {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": 4}}) + ✅ {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": Any}}) + ✅ {pass: false} expect([1, 2]).toMatchObject([1, 3]) + ✅ {pass: false} expect([0]).toMatchObject([-0]) + ✅ {pass: false} expect(Set {1, 2}).toMatchObject(Set {2}) + ✅ {pass: false} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-10-10T00:00:00.000Z) + ✅ {pass: false} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-10-10T00:00:00.000Z}) + ✅ {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": "4"}) + ✅ {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": undefined}) + ✅ {pass: false} expect({"a": undefined}).toMatchObject({"a": null}) + ✅ {pass: false} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "c"}]}) + ✅ {pass: false} expect({"a": 1, "b": 1, "c": 1, "d": {"e": {"f": 555}}}).toMatchObject({"d": {"e": {"f": 222}}}) + ✅ {pass: false} expect({}).toMatchObject({"a": undefined}) + ✅ {pass: false} expect([1, 2, 3]).toMatchObject([2, 3, 1]) + ✅ {pass: false} expect([1, 2, 3]).toMatchObject([1, 2, 2]) + ✅ {pass: false} expect([Error: foo]).toMatchObject([Error: bar]) + ✅ {pass: false} expect({"a": "b"}).toMatchObject({"c": "d"}) + ✅ {pass: false} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "c", Symbol(jest): Any}) + ✅ {pass: false} expect({"a": "b"}).toMatchObject({"toString": Any}) + ✅ throws expect(null).toMatchObject({}) + ✅ throws expect(4).toMatchObject({}) + ✅ throws expect("44").toMatchObject({}) + ✅ throws expect(true).toMatchObject({}) + ✅ throws expect(undefined).toMatchObject({}) + ✅ throws expect({}).toMatchObject(null) + ✅ throws expect({}).toMatchObject(4) + ✅ throws expect({}).toMatchObject("some string") + ✅ throws expect({}).toMatchObject(true) + ✅ throws expect({}).toMatchObject(undefined) + ✅ does not match properties up in the prototype chain +``` +### ✅ packages/expect/src/__tests__/spyMatchers.test.ts +``` +toBeCalled + ✅ works only on spies or jest.fn + ✅ passes when called + ✅ .not passes when called + ✅ fails with any argument passed + ✅ .not fails with any argument passed + ✅ includes the custom mock name in the error message +toHaveBeenCalled + ✅ works only on spies or jest.fn + ✅ passes when called + ✅ .not passes when called + ✅ fails with any argument passed + ✅ .not fails with any argument passed + ✅ includes the custom mock name in the error message +toBeCalledTimes + ✅ .not works only on spies or jest.fn + ✅ only accepts a number argument + ✅ .not only accepts a number argument + ✅ passes if function called equal to expected times + ✅ .not passes if function called more than expected times + ✅ .not passes if function called less than expected times + ✅ includes the custom mock name in the error message +toHaveBeenCalledTimes + ✅ .not works only on spies or jest.fn + ✅ only accepts a number argument + ✅ .not only accepts a number argument + ✅ passes if function called equal to expected times + ✅ .not passes if function called more than expected times + ✅ .not passes if function called less than expected times + ✅ includes the custom mock name in the error message +lastCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with many arguments + ✅ works with many arguments that don't match + ✅ includes the custom mock name in the error message +toHaveBeenLastCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with many arguments + ✅ works with many arguments that don't match + ✅ includes the custom mock name in the error message +nthCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with three calls + ✅ positive throw matcher error for n that is not positive integer + ✅ positive throw matcher error for n that is not integer + ✅ negative throw matcher error for n that is not integer + ✅ includes the custom mock name in the error message +toHaveBeenNthCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with three calls + ✅ positive throw matcher error for n that is not positive integer + ✅ positive throw matcher error for n that is not integer + ✅ negative throw matcher error for n that is not integer + ✅ includes the custom mock name in the error message +toBeCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with many arguments + ✅ works with many arguments that don't match + ✅ includes the custom mock name in the error message +toHaveBeenCalledWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with arguments that don't match + ✅ works with arguments that match + ✅ works with trailing undefined arguments + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects + ✅ works with many arguments + ✅ works with many arguments that don't match + ✅ includes the custom mock name in the error message +toReturn + ✅ .not works only on jest.fn + ✅ throw matcher error if received is spy + ✅ passes when returned + ✅ passes when undefined is returned + ✅ passes when at least one call does not throw + ✅ .not passes when not returned + ✅ .not passes when all calls throw + ✅ .not passes when a call throws undefined + ✅ fails with any argument passed + ✅ .not fails with any argument passed + ✅ includes the custom mock name in the error message + ✅ incomplete recursive calls are handled properly +toHaveReturned + ✅ .not works only on jest.fn + ✅ throw matcher error if received is spy + ✅ passes when returned + ✅ passes when undefined is returned + ✅ passes when at least one call does not throw + ✅ .not passes when not returned + ✅ .not passes when all calls throw + ✅ .not passes when a call throws undefined + ✅ fails with any argument passed + ✅ .not fails with any argument passed + ✅ includes the custom mock name in the error message + ✅ incomplete recursive calls are handled properly +toReturnTimes + ✅ throw matcher error if received is spy + ✅ only accepts a number argument + ✅ .not only accepts a number argument + ✅ passes if function returned equal to expected times + ✅ calls that return undefined are counted as returns + ✅ .not passes if function returned more than expected times + ✅ .not passes if function called less than expected times + ✅ calls that throw are not counted + ✅ calls that throw undefined are not counted + ✅ includes the custom mock name in the error message + ✅ incomplete recursive calls are handled properly +toHaveReturnedTimes + ✅ throw matcher error if received is spy + ✅ only accepts a number argument + ✅ .not only accepts a number argument + ✅ passes if function returned equal to expected times + ✅ calls that return undefined are counted as returns + ✅ .not passes if function returned more than expected times + ✅ .not passes if function called less than expected times + ✅ calls that throw are not counted + ✅ calls that throw undefined are not counted + ✅ includes the custom mock name in the error message + ✅ incomplete recursive calls are handled properly +lastReturnedWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +lastReturnedWith lastReturnedWith + ✅ works with three calls + ✅ incomplete recursive calls are handled properly +toHaveLastReturnedWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +toHaveLastReturnedWith lastReturnedWith + ✅ works with three calls + ✅ incomplete recursive calls are handled properly +nthReturnedWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +nthReturnedWith nthReturnedWith + ✅ works with three calls + ✅ should replace 1st, 2nd, 3rd with first, second, third + ✅ positive throw matcher error for n that is not positive integer + ✅ should reject nth value greater than number of calls + ✅ positive throw matcher error for n that is not integer + ✅ negative throw matcher error for n that is not number + ✅ incomplete recursive calls are handled properly +toHaveNthReturnedWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +toHaveNthReturnedWith nthReturnedWith + ✅ works with three calls + ✅ should replace 1st, 2nd, 3rd with first, second, third + ✅ positive throw matcher error for n that is not positive integer + ✅ should reject nth value greater than number of calls + ✅ positive throw matcher error for n that is not integer + ✅ negative throw matcher error for n that is not number + ✅ incomplete recursive calls are handled properly +toReturnWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +toReturnWith returnedWith + ✅ works with more calls than the limit + ✅ incomplete recursive calls are handled properly +toHaveReturnedWith + ✅ works only on spies or jest.fn + ✅ works when not called + ✅ works with no arguments + ✅ works with argument that does not match + ✅ works with argument that does match + ✅ works with undefined + ✅ works with Map + ✅ works with Set + ✅ works with Immutable.js objects directly created + ✅ works with Immutable.js objects indirectly created + ✅ a call that throws is not considered to have returned + ✅ a call that throws undefined is not considered to have returned + ✅ includes the custom mock name in the error message +toHaveReturnedWith returnedWith + ✅ works with more calls than the limit + ✅ incomplete recursive calls are handled properly +``` +### ✅ packages/expect/src/__tests__/stacktrace.test.ts +``` +✅ stack trace points to correct location when using matchers +✅ stack trace points to correct location when using nested matchers +✅ stack trace points to correct location when throwing from a custom matcher +``` +### ✅ packages/expect/src/__tests__/symbolInObjects.test.ts +``` +Symbol in objects + ✅ should compare objects with Symbol keys + ✅ should compare objects with mixed keys and Symbol + ✅ should compare objects with different Symbol keys +``` +### ✅ packages/expect/src/__tests__/toEqual-dom.test.ts +``` +toEqual duck type Text + ✅ isNot false + ✅ isNot true +toEqual duck type Element + ✅ isNot false + ✅ isNot true +toEqual duck type Fragment + ✅ isNot false + ✅ isNot true +toEqual document createTextNode + ✅ isNot false + ✅ isNot true +toEqual document createElement + ✅ isNot false + ✅ isNot true +toEqual document createDocumentFragment + ✅ isNot false + ✅ isNot true +``` +### ✅ packages/expect/src/__tests__/toThrowMatchers.test.ts +``` +toThrowError + ✅ to throw or not to throw + ✅ invalid arguments + ✅ invalid actual +toThrowError substring + ✅ passes + ✅ did not throw at all + ✅ threw, but message did not match (error) + ✅ threw, but message did not match (non-error falsey) + ✅ properly escapes strings when matching against errors + ✅ threw, but message should not match (error) + ✅ threw, but message should not match (non-error truthy) +toThrowError regexp + ✅ passes + ✅ did not throw at all + ✅ threw, but message did not match (error) + ✅ threw, but message did not match (non-error falsey) + ✅ threw, but message should not match (error) + ✅ threw, but message should not match (non-error truthy) +toThrowError error class + ✅ passes + ✅ did not throw at all + ✅ threw, but class did not match (error) + ✅ threw, but class did not match (non-error falsey) + ✅ threw, but class should not match (error) + ✅ threw, but class should not match (error subclass) + ✅ threw, but class should not match (error subsubclass) +toThrowError error-message pass + ✅ isNot false + ✅ isNot true +toThrowError error-message fail + ✅ isNot false + ✅ isNot true + ✅ multiline diff highlight incorrect expected space +toThrowError asymmetric any-Class pass + ✅ isNot false + ✅ isNot true +toThrowError asymmetric any-Class fail + ✅ isNot false + ✅ isNot true +toThrowError asymmetric anything pass + ✅ isNot false + ✅ isNot true +toThrowError asymmetric anything fail + ✅ isNot false + ✅ isNot true +toThrowError asymmetric no-symbol pass + ✅ isNot false + ✅ isNot true +toThrowError asymmetric no-symbol fail + ✅ isNot false + ✅ isNot true +toThrowError asymmetric objectContaining pass + ✅ isNot false + ✅ isNot true +toThrowError asymmetric objectContaining fail + ✅ isNot false + ✅ isNot true +toThrowError promise/async throws if Error-like object is returned + ✅ passes + ✅ did not throw at all + ✅ threw, but class did not match + ✅ threw, but should not have +toThrowError expected is undefined + ✅ threw, but should not have (non-error falsey) +toThrow + ✅ to throw or not to throw + ✅ invalid arguments + ✅ invalid actual +toThrow substring + ✅ passes + ✅ did not throw at all + ✅ threw, but message did not match (error) + ✅ threw, but message did not match (non-error falsey) + ✅ properly escapes strings when matching against errors + ✅ threw, but message should not match (error) + ✅ threw, but message should not match (non-error truthy) +toThrow regexp + ✅ passes + ✅ did not throw at all + ✅ threw, but message did not match (error) + ✅ threw, but message did not match (non-error falsey) + ✅ threw, but message should not match (error) + ✅ threw, but message should not match (non-error truthy) +toThrow error class + ✅ passes + ✅ did not throw at all + ✅ threw, but class did not match (error) + ✅ threw, but class did not match (non-error falsey) + ✅ threw, but class should not match (error) + ✅ threw, but class should not match (error subclass) + ✅ threw, but class should not match (error subsubclass) +toThrow error-message pass + ✅ isNot false + ✅ isNot true +toThrow error-message fail + ✅ isNot false + ✅ isNot true + ✅ multiline diff highlight incorrect expected space +toThrow asymmetric any-Class pass + ✅ isNot false + ✅ isNot true +toThrow asymmetric any-Class fail + ✅ isNot false + ✅ isNot true +toThrow asymmetric anything pass + ✅ isNot false + ✅ isNot true +toThrow asymmetric anything fail + ✅ isNot false + ✅ isNot true +toThrow asymmetric no-symbol pass + ✅ isNot false + ✅ isNot true +toThrow asymmetric no-symbol fail + ✅ isNot false + ✅ isNot true +toThrow asymmetric objectContaining pass + ✅ isNot false + ✅ isNot true +toThrow asymmetric objectContaining fail + ✅ isNot false + ✅ isNot true +toThrow promise/async throws if Error-like object is returned + ✅ passes + ✅ did not throw at all + ✅ threw, but class did not match + ✅ threw, but should not have +toThrow expected is undefined + ✅ threw, but should not have (non-error falsey) +``` +### ✅ packages/expect/src/__tests__/utils.test.ts +``` +getPath() + ✅ property exists + ✅ property doesnt exist + ✅ property exist but undefined + ✅ property is a getter on class instance + ✅ property is inherited + ✅ path breaks + ✅ empty object at the end +getObjectSubset + ✅ expect(getObjectSubset({"a": "b", "c": "d"}, {"a": "d"})).toEqual({"a": "b"}) + ✅ expect(getObjectSubset({"a": [1, 2], "b": "b"}, {"a": [3, 4]})).toEqual({"a": [1, 2]}) + ✅ expect(getObjectSubset([{"a": "b", "c": "d"}], [{"a": "z"}])).toEqual([{"a": "b"}]) + ✅ expect(getObjectSubset([1, 2], [1, 2, 3])).toEqual([1, 2]) + ✅ expect(getObjectSubset({"a": [1]}, {"a": [1, 2]})).toEqual({"a": [1]}) + ✅ expect(getObjectSubset(2015-11-30T00:00:00.000Z, 2016-12-30T00:00:00.000Z)).toEqual(2015-11-30T00:00:00.000Z) +getObjectSubset returns the object instance if the subset has no extra properties + ✅ Date +getObjectSubset returns the subset instance if its property values are equal + ✅ Object +getObjectSubset returns the subset instance if its property values are equal Uint8Array + ✅ expected + ✅ received +getObjectSubset calculating subsets of objects with circular references + ✅ simple circular references + ✅ transitive circular references +emptyObject() + ✅ matches an empty object + ✅ does not match an object with keys + ✅ does not match a non-object +subsetEquality() + ✅ matching object returns true + ✅ object without keys is undefined + ✅ objects to not match + ✅ null does not return errors + ✅ undefined does not return errors +subsetEquality() matching subsets with circular references + ✅ simple circular references + ✅ referenced object on same level should not regarded as circular reference + ✅ transitive circular references +iterableEquality + ✅ returns true when given circular iterators + ✅ returns true when given circular Set + ✅ returns true when given nested Sets + ✅ returns false when given inequal set within a set + ✅ returns false when given inequal map within a set + ✅ returns false when given inequal set within a map + ✅ returns true when given circular Set shape + ✅ returns true when given circular key in Map + ✅ returns true when given nested Maps + ✅ returns true when given circular key and value in Map + ✅ returns true when given circular value in Map +``` +### ✅ packages/jest-circus/src/__tests__/afterAll.test.ts +``` +✅ tests are not marked done until their parent afterAll runs +✅ describe block cannot have hooks and no tests +✅ describe block _can_ have hooks if a child describe block has tests +✅ describe block hooks must not run if describe block is skipped +✅ child tests marked with todo should not run if describe block is skipped +✅ child tests marked with only should not run if describe block is skipped +``` +### ✅ packages/jest-circus/src/__tests__/baseTest.test.ts +``` +✅ simple test +✅ failures +``` +### ✅ packages/jest-circus/src/__tests__/circusItTestError.test.ts +``` +test/it error throwing + ✅ it doesn't throw an error with valid arguments + ✅ it throws error with missing callback function + ✅ it throws an error when first argument isn't a string + ✅ it throws an error when callback function is not a function + ✅ test doesn't throw an error with valid arguments + ✅ test throws error with missing callback function + ✅ test throws an error when first argument isn't a string + ✅ test throws an error when callback function is not a function +``` +### ✅ packages/jest-circus/src/__tests__/circusItTodoTestError.test.ts +``` +test/it.todo error throwing + ✅ todo throws error when given no arguments + ✅ todo throws error when given more than one argument + ✅ todo throws error when given none string description +``` +### ✅ packages/jest-circus/src/__tests__/hooks.test.ts +``` +✅ beforeEach is executed before each test in current/child describe blocks +✅ multiple before each hooks in one describe are executed in the right order +✅ beforeAll is exectued correctly +``` +### ✅ packages/jest-circus/src/__tests__/hooksError.test.ts +``` +beforeEach hooks error throwing + ✅ beforeEach throws an error when "String" is provided as a first argument to it + ✅ beforeEach throws an error when 1 is provided as a first argument to it + ✅ beforeEach throws an error when [] is provided as a first argument to it + ✅ beforeEach throws an error when {} is provided as a first argument to it + ✅ beforeEach throws an error when Symbol(hello) is provided as a first argument to it + ✅ beforeEach throws an error when true is provided as a first argument to it + ✅ beforeEach throws an error when null is provided as a first argument to it + ✅ beforeEach throws an error when undefined is provided as a first argument to it +beforeAll hooks error throwing + ✅ beforeAll throws an error when "String" is provided as a first argument to it + ✅ beforeAll throws an error when 1 is provided as a first argument to it + ✅ beforeAll throws an error when [] is provided as a first argument to it + ✅ beforeAll throws an error when {} is provided as a first argument to it + ✅ beforeAll throws an error when Symbol(hello) is provided as a first argument to it + ✅ beforeAll throws an error when true is provided as a first argument to it + ✅ beforeAll throws an error when null is provided as a first argument to it + ✅ beforeAll throws an error when undefined is provided as a first argument to it +afterEach hooks error throwing + ✅ afterEach throws an error when "String" is provided as a first argument to it + ✅ afterEach throws an error when 1 is provided as a first argument to it + ✅ afterEach throws an error when [] is provided as a first argument to it + ✅ afterEach throws an error when {} is provided as a first argument to it + ✅ afterEach throws an error when Symbol(hello) is provided as a first argument to it + ✅ afterEach throws an error when true is provided as a first argument to it + ✅ afterEach throws an error when null is provided as a first argument to it + ✅ afterEach throws an error when undefined is provided as a first argument to it +afterAll hooks error throwing + ✅ afterAll throws an error when "String" is provided as a first argument to it + ✅ afterAll throws an error when 1 is provided as a first argument to it + ✅ afterAll throws an error when [] is provided as a first argument to it + ✅ afterAll throws an error when {} is provided as a first argument to it + ✅ afterAll throws an error when Symbol(hello) is provided as a first argument to it + ✅ afterAll throws an error when true is provided as a first argument to it + ✅ afterAll throws an error when null is provided as a first argument to it + ✅ afterAll throws an error when undefined is provided as a first argument to it +``` +### ✅ packages/jest-cli/src/__tests__/cli/args.test.ts +``` +check + ✅ returns true if the arguments are valid + ✅ raises an exception if runInBand and maxWorkers are both specified + ✅ raises an exception if onlyChanged and watchAll are both specified + ✅ raises an exception if onlyFailures and watchAll are both specified + ✅ raises an exception when lastCommit and watchAll are both specified + ✅ raises an exception if findRelatedTests is specified with no file paths + ✅ raises an exception if maxWorkers is specified with no number + ✅ allows maxWorkers to be a % + ✅ allows using "js" file for --config option + ✅ allows using "ts" file for --config option + ✅ allows using "mjs" file for --config option + ✅ allows using "cjs" file for --config option + ✅ allows using "json" file for --config option + ✅ raises an exception if selectProjects is not provided any project names + ✅ raises an exception if config is not a valid JSON string + ✅ raises an exception if config is not a supported file type +buildArgv + ✅ should return only camelcased args +``` +### ✅ packages/jest-cli/src/init/__tests__/init.test.js +``` +init project with package.json and no jest config all questions answered with answer: "No" + ✅ should return the default configuration (an empty config) + ✅ should generate empty config with mjs extension +init project with package.json and no jest config some questions answered with answer: "Yes" + ✅ should create configuration for {clearMocks: true} + ✅ should create configuration for {coverage: true} + ✅ should create configuration for {coverageProvider: "babel"} + ✅ should create configuration for {coverageProvider: "v8"} + ✅ should create configuration for {environment: "jsdom"} + ✅ should create configuration for {environment: "node"} + ✅ should create package.json with configured test command when {scripts: true} +init no package json + ✅ should throw an error if there is no package.json file +init has-jest-config-file-js ask the user whether to override config or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init has-jest-config-file-ts ask the user whether to override config or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init has-jest-config-file-mjs ask the user whether to override config or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init has-jest-config-file-cjs ask the user whether to override config or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init has-jest-config-file-json ask the user whether to override config or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init project using jest.config.ts ask the user whether he wants to use Typescript or not + ✅ user answered with "Yes" + ✅ user answered with "No" +init has jest config in package.json + ✅ should ask the user whether to override config or not +init already has "jest" in packageJson.scripts.test + ✅ should not ask "test script question" +``` +### ✅ packages/jest-cli/src/init/__tests__/modifyPackageJson.test.ts +``` +✅ should remove jest config if exists +✅ should add test script when there are no scripts +✅ should add test script when there are scripts +✅ should not add test script when { shouldModifyScripts: false } +``` +### ✅ packages/jest-config/src/__tests__/Defaults.test.ts +``` +✅ get configuration defaults +``` +### ✅ packages/jest-config/src/__tests__/getMaxWorkers.test.ts +``` +getMaxWorkers + ✅ Returns 1 when runInBand + ✅ Returns 1 when the OS CPUs are not available + ✅ Returns the `maxWorkers` when specified + ✅ Returns based on the number of cpus +getMaxWorkers % based + ✅ 50% = 2 workers + ✅ < 0 workers should become 1 + ✅ 0% shouldn't break +``` +### ✅ packages/jest-config/src/__tests__/normalize.test.js +``` +✅ picks a name based on the rootDir +✅ keeps custom project name based on the projects rootDir +✅ keeps custom names based on the rootDir +✅ minimal config is stable across runs +✅ sets coverageReporters correctly when argv.json is set +rootDir + ✅ throws if the options is missing a rootDir property +automock + ✅ falsy automock is not overwritten +collectCoverageOnlyFrom + ✅ normalizes all paths relative to rootDir + ✅ does not change absolute paths + ✅ substitutes tokens +collectCoverageFrom + ✅ substitutes tokens +findRelatedTests + ✅ it generates --coverageCoverageFrom patterns when needed +roots + ✅ normalizes all paths relative to rootDir + ✅ does not change absolute paths + ✅ substitutes tokens +transform + ✅ normalizes the path + ✅ pulls in config if it's passed as an array, and defaults to empty object +haste + ✅ normalizes the path for hasteImplModulePath +setupFilesAfterEnv + ✅ normalizes the path according to rootDir + ✅ does not change absolute paths + ✅ substitutes tokens +setupTestFrameworkScriptFile + ✅ logs a deprecation warning when `setupTestFrameworkScriptFile` is used + ✅ logs an error when `setupTestFrameworkScriptFile` and `setupFilesAfterEnv` are used +coveragePathIgnorePatterns + ✅ does not normalize paths relative to rootDir + ✅ does not normalize trailing slashes + ✅ substitutes tokens +watchPathIgnorePatterns + ✅ does not normalize paths relative to rootDir + ✅ does not normalize trailing slashes + ✅ substitutes tokens +testPathIgnorePatterns + ✅ does not normalize paths relative to rootDir + ✅ does not normalize trailing slashes + ✅ substitutes tokens +modulePathIgnorePatterns + ✅ does not normalize paths relative to rootDir + ✅ does not normalize trailing slashes + ✅ substitutes tokens +testRunner + ✅ defaults to Circus + ✅ resolves jasmine + ✅ is overwritten by argv +coverageDirectory + ✅ defaults to /coverage +testEnvironment + ✅ resolves to an environment and prefers jest-environment-`name` + ✅ throws on invalid environment names + ✅ works with rootDir +babel-jest + ✅ correctly identifies and uses babel-jest + ✅ uses babel-jest if babel-jest is explicitly specified in a custom transform options +Upgrade help + ✅ logs a warning when `scriptPreprocessor` and/or `preprocessorIgnorePatterns` are used +testRegex + ✅ testRegex empty string is mapped to empty array + ✅ testRegex string is mapped to an array + ✅ testRegex array is preserved +testMatch + ✅ testMatch default not applied if testRegex is set + ✅ testRegex default not applied if testMatch is set + ✅ throws if testRegex and testMatch are both specified + ✅ normalizes testMatch +moduleDirectories + ✅ defaults to node_modules + ✅ normalizes moduleDirectories +preset + ✅ throws when preset not found + ✅ throws when module was found but no "jest-preset.js" or "jest-preset.json" files + ✅ throws when a dependency is missing in the preset + ✅ throws when preset is invalid + ✅ throws when preset evaluation throws type error + ✅ works with "react-native" + ✅ searches for .json and .js preset files + ✅ merges with options + ✅ merges with options and moduleNameMapper preset is overridden by options + ✅ merges with options and transform preset is overridden by options + ✅ extracts setupFilesAfterEnv from preset +preset with globals + ✅ should merge the globals preset correctly +preset without setupFiles + ✅ should normalize setupFiles correctly +preset without setupFilesAfterEnv + ✅ should normalize setupFilesAfterEnv correctly +runner + ✅ defaults to `jest-runner` + ✅ resolves to runners that do not have the prefix + ✅ resolves to runners and prefers jest-runner-`name` + ✅ throw error when a runner is not found +watchPlugins + ✅ defaults to undefined + ✅ resolves to watch plugins and prefers jest-watch-`name` + ✅ resolves watch plugins that do not have the prefix + ✅ normalizes multiple watchPlugins + ✅ throw error when a watch plugin is not found +testPathPattern + ✅ defaults to empty + ✅ joins multiple --testPathPatterns and + ✅ gives precedence to --all +testPathPattern --testPathPattern + ✅ uses --testPathPattern if set + ✅ ignores invalid regular expressions and logs a warning + ✅ joins multiple --testPathPattern if set +testPathPattern --testPathPattern posix + ✅ should not escape the pattern +testPathPattern --testPathPattern win32 + ✅ preserves any use of "\" + ✅ replaces POSIX path separators + ✅ replaces POSIX paths in multiple args + ✅ coerces all patterns to strings +testPathPattern + ✅ uses if set + ✅ ignores invalid regular expressions and logs a warning + ✅ joins multiple if set +testPathPattern posix + ✅ should not escape the pattern +testPathPattern win32 + ✅ preserves any use of "\" + ✅ replaces POSIX path separators + ✅ replaces POSIX paths in multiple args + ✅ coerces all patterns to strings +moduleFileExtensions + ✅ defaults to something useful + ✅ throws if missing `js` but using jest-runner + ✅ does not throw if missing `js` with a custom runner +cwd + ✅ is set to process.cwd + ✅ is not lost if the config has its own cwd property +Defaults + ✅ should be accepted by normalize +displayName + ✅ should throw an error when displayName is is an empty object + ✅ should throw an error when displayName is missing color + ✅ should throw an error when displayName is missing name + ✅ should throw an error when displayName is using invalid values + ✅ generates a default color for the runner undefined + ✅ generates a default color for the runner jest-runner + ✅ generates a default color for the runner jest-runner-eslint + ✅ generates a default color for the runner jest-runner-tslint + ✅ generates a default color for the runner jest-runner-tsc +testTimeout + ✅ should return timeout value if defined + ✅ should throw an error if timeout is a negative number +extensionsToTreatAsEsm + ✅ should pass valid config through + ✅ should enforce leading dots + ✅ throws on .js + ✅ throws on .mjs + ✅ throws on .cjs +``` +### ✅ packages/jest-config/src/__tests__/readConfig.test.ts +``` +✅ readConfig() throws when an object is passed without a file path +``` +### ✅ packages/jest-config/src/__tests__/readConfigs.test.ts +``` +✅ readConfigs() throws when called without project paths +✅ readConfigs() loads async config file +✅ readConfigs() reject if async was rejected +``` +### ✅ packages/jest-config/src/__tests__/resolveConfigPath.test.ts +``` +Resolve config path .js + ✅ file path with ".js" + ✅ directory path with ".js" +Resolve config path .ts + ✅ file path with ".ts" + ✅ directory path with ".ts" +Resolve config path .mjs + ✅ file path with ".mjs" + ✅ directory path with ".mjs" +Resolve config path .cjs + ✅ file path with ".cjs" + ✅ directory path with ".cjs" +Resolve config path .json + ✅ file path with ".json" + ✅ directory path with ".json" +``` +### ✅ packages/jest-config/src/__tests__/setFromArgv.test.ts +``` +✅ maps special values to valid options +✅ maps regular values to themselves +✅ works with string objects +✅ explicit flags override those from --config +``` +### ✅ packages/jest-config/src/__tests__/validatePattern.test.ts +``` +validate pattern function + ✅ without passed args returns true + ✅ returns true for empty pattern + ✅ returns true for valid pattern + ✅ returns false for invalid pattern +``` +### ✅ packages/jest-console/src/__tests__/bufferedConsole.test.ts +``` +CustomConsole assert + ✅ do not log when the assertion is truthy + ✅ do not log when the assertion is truthy and there is a message + ✅ log the assertion error when the assertion is falsy + ✅ log the assertion error when the assertion is falsy with another message argument +CustomConsole count + ✅ count using the default counter + ✅ count using the a labeled counter + ✅ countReset restarts default counter + ✅ countReset restarts custom counter +CustomConsole group + ✅ group without label + ✅ group with label + ✅ groupEnd remove the indentation of the current group + ✅ groupEnd can not remove the indentation below the starting point +CustomConsole time + ✅ should return the time between time() and timeEnd() on default timer + ✅ should return the time between time() and timeEnd() on custom timer +CustomConsole dir + ✅ should print the deepest value +CustomConsole timeLog + ✅ should return the time between time() and timeEnd() on default timer + ✅ should return the time between time() and timeEnd() on custom timer + ✅ default timer with data + ✅ custom timer with data +CustomConsole console + ✅ should be able to initialize console instance +``` +### ✅ packages/jest-console/src/__tests__/CustomConsole.test.ts +``` +CustomConsole log + ✅ should print to stdout +CustomConsole error + ✅ should print to stderr +CustomConsole warn + ✅ should print to stderr +CustomConsole assert + ✅ do not log when the assertion is truthy + ✅ do not log when the assertion is truthy and there is a message + ✅ log the assertion error when the assertion is falsy + ✅ log the assertion error when the assertion is falsy with another message argument +CustomConsole count + ✅ count using the default counter + ✅ count using the a labeled counter + ✅ countReset restarts default counter + ✅ countReset restarts custom counter +CustomConsole group + ✅ group without label + ✅ group with label + ✅ groupEnd remove the indentation of the current group + ✅ groupEnd can not remove the indentation below the starting point +CustomConsole time + ✅ should return the time between time() and timeEnd() on default timer + ✅ should return the time between time() and timeEnd() on custom timer +CustomConsole dir + ✅ should print the deepest value +CustomConsole timeLog + ✅ should return the time between time() and timeEnd() on default timer + ✅ should return the time between time() and timeEnd() on custom timer + ✅ default timer with data + ✅ custom timer with data +CustomConsole console + ✅ should be able to initialize console instance +``` +### ✅ packages/jest-console/src/__tests__/getConsoleOutput.test.ts +``` +getConsoleOutput + ✅ takes noStackTrace and pass it on for assert + ✅ takes noStackTrace and pass it on for count + ✅ takes noStackTrace and pass it on for debug + ✅ takes noStackTrace and pass it on for dir + ✅ takes noStackTrace and pass it on for dirxml + ✅ takes noStackTrace and pass it on for error + ✅ takes noStackTrace and pass it on for group + ✅ takes noStackTrace and pass it on for groupCollapsed + ✅ takes noStackTrace and pass it on for info + ✅ takes noStackTrace and pass it on for log + ✅ takes noStackTrace and pass it on for time + ✅ takes noStackTrace and pass it on for warn +``` +### ✅ packages/jest-core/src/__tests__/FailedTestsCache.test.js +``` +FailedTestsCache + ✅ should filter tests +``` +### ✅ packages/jest-core/src/__tests__/getNoTestsFoundMessage.test.js +``` +getNoTestsFoundMessage + ✅ returns correct message when monitoring only failures + ✅ returns correct message when monitoring only changed + ✅ returns correct message with verbose option + ✅ returns correct message without options + ✅ returns correct message with passWithNoTests +``` +### ✅ packages/jest-core/src/__tests__/globals.test.ts +``` +Common globals + ✅ check process +``` +### ✅ packages/jest-core/src/__tests__/runJest.test.js +``` +runJest + ✅ when watch is set then exit process + ✅ when watch is set then an error message is printed +``` +### ✅ packages/jest-core/src/__tests__/SearchSource.test.ts +``` +SearchSource isTestFilePath + ✅ supports ../ paths and unix separators via testRegex + ✅ supports unix separators + ✅ supports win32 separators +SearchSource testPathsMatching + ✅ finds tests matching a pattern via testRegex + ✅ finds tests matching a pattern via testMatch + ✅ finds tests matching a JS regex pattern + ✅ finds tests matching a JS glob pattern + ✅ finds tests matching a JS with overriding glob patterns + ✅ finds tests with default file extensions using testRegex + ✅ finds tests with default file extensions using testMatch + ✅ finds tests with parentheses in their rootDir when using testMatch + ✅ finds tests with similar but custom file extensions + ✅ finds tests with totally custom foobar file extensions + ✅ finds tests with many kinds of file extensions + ✅ finds tests using a regex only + ✅ finds tests using a glob only +SearchSource findRelatedTests + ✅ makes sure a file is related to itself + ✅ finds tests that depend directly on the path + ✅ excludes untested files from coverage +SearchSource findRelatedTestsFromPattern + ✅ returns empty search result for empty input + ✅ returns empty search result for invalid input + ✅ returns empty search result if no related tests were found + ✅ finds tests for a single file + ✅ finds tests for multiple files + ✅ does not mistake roots folders with prefix names +SearchSource findRelatedSourcesFromTestsInChangedFiles + ✅ return empty set if no SCM + ✅ return sources required by tests +``` +### ✅ packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js +``` +SnapshotInteractiveMode + ✅ is inactive at construction + ✅ call to run process the first file + ✅ call to abort + ✅ call to reset + ✅ press Q or ESC triggers an abort + ✅ press ENTER trigger a run + ✅ skip 1 test, then restart + ✅ skip 1 test, then quit + ✅ update 1 test, then finish and return + ✅ skip 2 tests, then finish and restart + ✅ update 2 tests, then finish and return + ✅ update 1 test, skip 1 test, then finish and restart + ✅ skip 1 test, update 1 test, then finish and restart +``` +### ✅ packages/jest-core/src/__tests__/TestScheduler.test.js +``` +✅ config for reporters supports `default` +✅ .addReporter() .removeReporter() +✅ schedule tests run in parallel per default +✅ schedule tests run in serial if the runner flags them +✅ should bail after `n` failures +✅ should not bail if less than `n` failures +✅ should set runInBand to run in serial +✅ should set runInBand to not run in serial +``` +### ✅ packages/jest-core/src/__tests__/testSchedulerHelper.test.js +``` +✅ shouldRunInBand() - should return true for runInBand mode +✅ shouldRunInBand() - should return true for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return true for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return true for runInBand mode +✅ shouldRunInBand() - should return true for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return false for runInBand mode +✅ shouldRunInBand() - should return true for runInBand mode +``` +### ✅ packages/jest-core/src/__tests__/watch.test.js +``` +Watch mode flows + ✅ Correctly passing test path pattern + ✅ Correctly passing test name pattern + ✅ Runs Jest once by default and shows usage + ✅ Runs Jest in a non-interactive environment not showing usage + ✅ resolves relative to the package root + ✅ shows prompts for WatchPlugins in alphabetical order + ✅ shows update snapshot prompt (without interactive) + ✅ shows update snapshot prompt (with interactive) + ✅ allows WatchPlugins to hook into JestHook + ✅ allows WatchPlugins to override eligible internal plugins + ✅ allows WatchPlugins to be configured + ✅ allows WatchPlugins to hook into file system changes + ✅ makes watch plugin initialization errors look nice + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ allows WatchPlugins to modify only white-listed global config keys + ✅ triggers enter on a WatchPlugin when its key is pressed + ✅ prevents Jest from handling keys when active and returns control when end is called + ✅ Pressing "o" runs test in "only changed files" mode + ✅ Pressing "a" runs test in "watch all" mode + ✅ Pressing "ENTER" reruns the tests + ✅ Pressing "t" reruns the tests in "test name pattern" mode + ✅ Pressing "p" reruns the tests in "filename pattern" mode + ✅ Can combine "p" and "t" filters + ✅ Pressing "u" reruns the tests in "update snapshot" mode + ✅ passWithNoTest should be set to true in watch mode + ✅ shows the correct usage for the f key in "only failed tests" mode +Watch mode flows when dealing with potential watch plugin key conflicts + ✅ forbids WatchPlugins overriding reserved internal plugins + ✅ forbids WatchPlugins overriding reserved internal plugins + ✅ forbids WatchPlugins overriding reserved internal plugins + ✅ allows WatchPlugins to override non-reserved internal plugins + ✅ allows WatchPlugins to override non-reserved internal plugins + ✅ forbids third-party WatchPlugins overriding each other +``` +### ✅ packages/jest-core/src/__tests__/watchFileChanges.test.ts +``` +Watch mode flows with changed files + ✅ should correct require new files without legacy cache +``` +### ✅ packages/jest-core/src/__tests__/watchFilenamePatternMode.test.js +``` +Watch mode flows + ✅ Pressing "P" enters pattern mode + ✅ Pressing "c" clears the filters +``` +### ✅ packages/jest-core/src/__tests__/watchTestNamePatternMode.test.js +``` +Watch mode flows + ✅ Pressing "T" enters pattern mode +``` +### ✅ packages/jest-core/src/lib/__tests__/isValidPath.test.ts +``` +✅ is valid when it is a file inside roots +✅ is not valid when it is a snapshot file +✅ is not valid when it is a file in the coverage dir +``` +### ✅ packages/jest-core/src/lib/__tests__/logDebugMessages.test.ts +``` +✅ prints the jest version +✅ prints the test framework name +✅ prints the config object +``` +### ✅ packages/jest-create-cache-key-function/src/__tests__/index.test.ts +``` +✅ creation of a cache key +``` +### ✅ packages/jest-diff/src/__tests__/diff.test.ts +``` +different types + ✅ '1' and 'a' + ✅ '[object Object]' and 'a' + ✅ '' and '2' + ✅ 'null' and 'undefined' + ✅ '() => {}' and '3' +no visual difference + ✅ '"a"' and '"a"' + ✅ '{}' and '{}' + ✅ '[]' and '[]' + ✅ '[1,2]' and '[1,2]' + ✅ '11' and '11' + ✅ 'null' and 'null' + ✅ 'null' and 'null' + ✅ 'undefined' and 'undefined' + ✅ 'null' and 'null' + ✅ 'undefined' and 'undefined' + ✅ 'false' and 'false' + ✅ '{"a":1}' and '{"a":1}' + ✅ '{"a":{"b":5}}' and '{"a":{"b":5}}' + ✅ Map key order should be irrelevant + ✅ Set value order should be irrelevant +✅ oneline strings +✅ numbers +✅ -0 and 0 +✅ booleans +✅ collapses big diffs to patch format +falls back to not call toJSON if serialization has no differences + ✅ but then objects have differences + ✅ and then objects have no differences +falls back to not call toJSON if it throws + ✅ and then objects have differences + ✅ and then objects have no differences +multiline strings + ✅ (unexpanded) + ✅ (expanded) +objects + ✅ (unexpanded) + ✅ (expanded) +multiline string non-snapshot + ✅ (unexpanded) + ✅ (expanded) +multiline string snapshot + ✅ (unexpanded) + ✅ (expanded) +React elements + ✅ (unexpanded) + ✅ (expanded) +multiline string as value of object property (non-snapshot) + ✅ (unexpanded) + ✅ (expanded) +multiline string as value of object property (snapshot) + ✅ (unexpanded) + ✅ (expanded) +indentation in JavaScript structures from less to more + ✅ (unexpanded) + ✅ (expanded) +indentation in JavaScript structures from more to less + ✅ (unexpanded) + ✅ (expanded) +color of text + ✅ (expanded) + ✅ (unexpanded) +indentation in React elements (non-snapshot) from less to more + ✅ (unexpanded) + ✅ (expanded) +indentation in React elements (non-snapshot) from more to less + ✅ (unexpanded) + ✅ (expanded) +indentation in React elements (snapshot) from less to more + ✅ (unexpanded) + ✅ (expanded) +indentation in React elements (snapshot) from more to less + ✅ (unexpanded) + ✅ (expanded) +outer React element (non-snapshot) from less to more + ✅ (unexpanded) + ✅ (expanded) +outer React element (non-snapshot) from more to less + ✅ (unexpanded) + ✅ (expanded) +trailing newline in multiline string not enclosed in quotes from less to more + ✅ (unexpanded) + ✅ (expanded) +trailing newline in multiline string not enclosed in quotes from more to less + ✅ (unexpanded) + ✅ (expanded) +context + ✅ number of lines: -1 (5 default) + ✅ number of lines: 0 + ✅ number of lines: 1 + ✅ number of lines: 2 + ✅ number of lines: 3.1 (5 default) + ✅ number of lines: undefined (5 default) +diffLinesUnified edge cases + ✅ a empty string b empty string + ✅ a empty string b one line + ✅ a multiple lines b empty string + ✅ a one line b multiple lines +diffLinesUnified2 edge cases + ✅ a empty string b empty string + ✅ a empty string b one line + ✅ a multiple lines b empty string + ✅ a one line b multiple lines +diffLinesUnified2 edge cases lengths not equal + ✅ a + ✅ b +diffStringsUnified edge cases + ✅ empty both a and b + ✅ empty only a + ✅ empty only b + ✅ equal both non-empty + ✅ multiline has no common after clean up chaff + ✅ one-line has no common after clean up chaff +options 7980 + ✅ diff + ✅ diffStringsUnified +options change indicators + ✅ diff +options change color + ✅ diffStringsUnified + ✅ no diff +options common + ✅ diff + ✅ no diff +options includeChangeCounts false + ✅ diffLinesUnified + ✅ diffStringsUnified +options includeChangeCounts true padding + ✅ diffLinesUnified a has 2 digits + ✅ diffLinesUnified b has 2 digits + ✅ diffStringsUnified +options omitAnnotationLines true + ✅ diff + ✅ diffStringsUnified and includeChangeCounts true + ✅ diffStringsUnified empty strings +options trailingSpaceFormatter + ✅ diffDefault default no color + ✅ diffDefault middle dot + ✅ diffDefault yellowish common +options emptyFirstOrLastLinePlaceholder default empty string + ✅ diffDefault + ✅ diffStringsUnified +``` +### ✅ packages/jest-diff/src/__tests__/diffStringsRaw.test.ts +``` +diffStringsRaw + ✅ one-line with cleanup + ✅ one-line without cleanup +``` +### ✅ packages/jest-diff/src/__tests__/getAlignedDiffs.test.ts +``` +getAlignedDiffs lines + ✅ change preceding and following common + ✅ common preceding and following change + ✅ common at end when both current change lines are empty + ✅ common between delete and insert + ✅ common between insert and delete +getAlignedDiffs newline + ✅ delete only + ✅ insert only + ✅ delete with adjacent change + ✅ insert with adjacent changes + ✅ change from space + ✅ change to space +getAlignedDiffs substrings first + ✅ common when both current change lines are empty + ✅ common when either current change line is non-empty + ✅ delete completes the current line + ✅ insert completes the current line +getAlignedDiffs substrings middle + ✅ is empty in delete between common + ✅ is empty in insert at start + ✅ is non-empty in delete at end + ✅ is non-empty in insert between common +getAlignedDiffs substrings last + ✅ is empty in delete at end + ✅ is empty in insert at end + ✅ is non-empty in common not at end +getAlignedDiffs strings + ✅ change at start and delete or insert at end + ✅ delete or insert at start and change at end +``` +### ✅ packages/jest-diff/src/__tests__/joinAlignedDiffs.test.ts +``` +joinAlignedDiffsExpand + ✅ first line is empty common +joinAlignedDiffsNoExpand + ✅ patch 0 with context 1 and change at start and end + ✅ patch 0 with context 5 and first line is empty common + ✅ patch 1 with context 4 and last line is empty common + ✅ patch 2 with context 3 + ✅ patch 3 with context 2 and omit excess common at start +``` +### ✅ packages/jest-docblock/src/__tests__/index.test.ts +``` +docblock + ✅ extracts valid docblock with line comment + ✅ extracts valid docblock + ✅ extracts valid docblock with more comments + ✅ extracts from invalid docblock + ✅ returns extract and parsedocblock + ✅ parses directives out of a docblock + ✅ parses multiple of the same directives out of a docblock + ✅ parses >=3 of the same directives out of a docblock + ✅ parses directives out of a docblock with comments + ✅ parses directives out of a docblock with line comments + ✅ parses multiline directives + ✅ parses multiline directives even if there are linecomments within the docblock + ✅ supports slashes in @team directive + ✅ extracts comments from docblock + ✅ extracts multiline comments from docblock + ✅ preserves leading whitespace in multiline comments from docblock + ✅ removes leading newlines in multiline comments from docblock + ✅ extracts comments from beginning and end of docblock + ✅ preserve urls within a pragma's values + ✅ strip linecomments from pragmas but preserve for comments + ✅ extracts docblock comments as CRLF when docblock contains CRLF + ✅ extracts docblock comments as LF when docblock contains LF + ✅ strips the docblock out of a file that contains a top docblock + ✅ returns a file unchanged if there is no top docblock to strip + ✅ prints docblocks with no pragmas as empty string + ✅ prints docblocks with one pragma on one line + ✅ prints docblocks with multiple pragmas on multiple lines + ✅ prints docblocks with multiple of the same pragma + ✅ prints docblocks with pragmas + ✅ prints docblocks with comments + ✅ prints docblocks with comments and no keys + ✅ prints docblocks with multiline comments + ✅ prints docblocks that are parseable + ✅ can augment existing docblocks with comments + ✅ prints docblocks using CRLF if comments contains CRLF + ✅ prints docblocks using LF if comments contains LF +``` +### ✅ packages/jest-each/src/__tests__/array.test.ts +``` +jest-each .test + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .test.concurrent + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .test.concurrent.only + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .test.concurrent.skip + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .test.only + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .it + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .fit + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .it.only + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .describe + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .fdescribe + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each .describe.only + ✅ throws an error when not called with an array + ✅ throws an error when called with an empty array + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using printf format + ✅ does not call global test with title containing more param values than sprintf placeholders + ✅ calls global test title with %p placeholder injected at the correct positions + ✅ does not calls global test title with %p placeholder when no data is supplied at given position + ✅ calls global with cb function containing all parameters of each test case when given 1d array + ✅ calls global with cb function containing all parameters of each test case 2d array + ✅ calls global with given timeout +jest-each done callback + ✅ calls [ 'test' ] with done when cb function has more args than params of given test row + ✅ calls [ 'test', 'only' ] with done when cb function has more args than params of given test row + ✅ calls [ 'test', 'concurrent' ] with done when cb function has more args than params of given test row + ✅ calls [ 'test', 'concurrent', 'only' ] with done when cb function has more args than params of given test row + ✅ calls [ 'it' ] with done when cb function has more args than params of given test row + ✅ calls [ 'fit' ] with done when cb function has more args than params of given test row + ✅ calls [ 'it', 'only' ] with done when cb function has more args than params of given test row + ✅ does not call [ 'describe' ] with done when test function has more args than params of given test row + ✅ does not call [ 'fdescribe' ] with done when test function has more args than params of given test row + ✅ does not call [ 'describe', 'only' ] with done when test function has more args than params of given test row +jest-each .xtest + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .test.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .xit + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .it.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .xdescribe + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +jest-each .describe.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using sprintf format + ✅ calls global with title with placeholder values correctly interpolated +``` +### ✅ packages/jest-each/src/__tests__/index.test.ts +``` +array .add + ✅ returns the result of adding 0 to 0 + ✅ returns the result of adding 0 to 1 + ✅ returns the result of adding 1 to 1 +concurrent .add + ✅ returns the result of adding 0 to 0 + ✅ returns the result of adding 0 to 1 + ✅ returns the result of adding 1 to 1 +template .add + ✅ returns 0 when given 0 and 0 + ✅ returns 1 when given 0 and 1 + ✅ returns 2 when given 1 and 1 +✅ throws an error when not called with the right number of arguments +``` +### ✅ packages/jest-each/src/__tests__/template.test.ts +``` +jest-each .test + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .test.concurrent + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .test.concurrent.only + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .test.concurrent.skip + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .test.only + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .it + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .fit + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .it.only + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .describe + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .fdescribe + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each .describe.only + ✅ throws error when there are additional words in first column heading + ✅ throws error when there are additional words in second column heading + ✅ throws error when there are additional words in last column heading + ✅ does not throw error when there is additional words in template after heading row + ✅ does not throw error when there is only one column + ✅ does not throw error when there is only one column with additional words in template after heading + ✅ throws error when there are no arguments for given headings + ✅ throws error when there are fewer arguments than headings when given one row + ✅ throws error when there are fewer arguments than headings over multiple rows + ✅ throws an error when called with an empty string + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format + ✅ calls global with title containing $key in multiple positions + ✅ calls global with title containing $key.path + ✅ calls global with title containing last seen object when $key.path is invalid + ✅ calls global with cb function with object built from table headings and values + ✅ calls global with given timeout + ✅ formats primitive values using .toString() +jest-each done callback + ✅ calls [ 'test' ] with done when cb function has more args than params of given test row + ✅ calls [ 'test', 'only' ] with done when cb function has more args than params of given test row + ✅ calls [ 'test', 'concurrent', 'only' ] with done when cb function has more args than params of given test row + ✅ calls [ 'it' ] with done when cb function has more args than params of given test row + ✅ calls [ 'fit' ] with done when cb function has more args than params of given test row + ✅ calls [ 'it', 'only' ] with done when cb function has more args than params of given test row + ✅ does not call [ 'describe' ] with done when test function has more args than params of given test row + ✅ does not call [ 'fdescribe' ] with done when test function has more args than params of given test row + ✅ does not call [ 'describe', 'only' ] with done when test function has more args than params of given test row +jest-each .xtest + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .test.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .xit + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .it.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .xdescribe + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +jest-each .describe.skip + ✅ calls global with given title + ✅ calls global with given title when multiple tests cases exist + ✅ calls global with title containing param values when using $variable format +``` +### ✅ packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.ts +``` +JSDomEnvironment + ✅ should configure setTimeout/setInterval to use the browser api + ✅ has modern fake timers implementation +``` +### ✅ packages/jest-environment-node/src/__tests__/node_environment.test.ts +``` +NodeEnvironment + ✅ uses a copy of the process object + ✅ exposes process.on + ✅ exposes global.global + ✅ should configure setTimeout/setInterval to use the node api + ✅ has modern fake timers implementation + ✅ TextEncoder references the same global Uint8Array constructor +``` +### ✅ packages/jest-fake-timers/src/__tests__/legacyFakeTimers.test.ts +``` +FakeTimers construction + ✅ installs setTimeout mock + ✅ accepts to promisify setTimeout mock + ✅ installs clearTimeout mock + ✅ installs setInterval mock + ✅ installs clearInterval mock + ✅ mocks process.nextTick if it exists on global + ✅ mocks setImmediate if it exists on global + ✅ mocks clearImmediate if setImmediate is on global +FakeTimers runAllTicks + ✅ runs all ticks, in order + ✅ does nothing when no ticks have been scheduled + ✅ only runs a scheduled callback once + ✅ cancels a callback even from native nextTick + ✅ cancels a callback even from native setImmediate + ✅ doesnt run a tick callback if native nextTick already did + ✅ doesnt run immediate if native setImmediate already did + ✅ native doesnt run immediate if fake already did + ✅ throws before allowing infinite recursion +FakeTimers runAllTimers + ✅ runs all timers in order + ✅ warns when trying to advance timers while real timers are used + ✅ does nothing when no timers have been scheduled + ✅ only runs a setTimeout callback once (ever) + ✅ runs callbacks with arguments after the interval + ✅ doesnt pass the callback to native setTimeout + ✅ throws before allowing infinite recursion + ✅ also clears ticks +FakeTimers advanceTimersByTime + ✅ runs timers in order + ✅ does nothing when no timers have been scheduled + ✅ throws before allowing infinite recursion +FakeTimers advanceTimersToNextTimer + ✅ runs timers in order + ✅ run correct amount of steps + ✅ setTimeout inside setTimeout + ✅ does nothing when no timers have been scheduled +FakeTimers reset + ✅ resets all pending setTimeouts + ✅ resets all pending setIntervals + ✅ resets all pending ticks callbacks & immediates + ✅ resets current advanceTimersByTime time cursor +FakeTimers runOnlyPendingTimers + ✅ runs all timers in order + ✅ does not run timers that were cleared in another timer +FakeTimers runWithRealTimers + ✅ executes callback with native timers + ✅ resets mock timers after executing callback + ✅ resets mock timer functions even if callback throws +FakeTimers useRealTimers + ✅ resets native timer APIs + ✅ resets native process.nextTick when present + ✅ resets native setImmediate when present +FakeTimers useFakeTimers + ✅ resets mock timer APIs + ✅ resets mock process.nextTick when present + ✅ resets mock setImmediate when present +FakeTimers getTimerCount + ✅ returns the correct count + ✅ includes immediates and ticks + ✅ not includes cancelled immediates +``` +### ✅ packages/jest-fake-timers/src/__tests__/modernFakeTimers.test.ts +``` +FakeTimers construction + ✅ installs setTimeout mock + ✅ installs clearTimeout mock + ✅ installs setInterval mock + ✅ installs clearInterval mock + ✅ mocks process.nextTick if it exists on global + ✅ mocks setImmediate if it exists on global + ✅ mocks clearImmediate if setImmediate is on global +FakeTimers runAllTicks + ✅ runs all ticks, in order + ✅ does nothing when no ticks have been scheduled + ✅ only runs a scheduled callback once + ✅ throws before allowing infinite recursion +FakeTimers runAllTimers + ✅ runs all timers in order + ✅ warns when trying to advance timers while real timers are used + ✅ does nothing when no timers have been scheduled + ✅ only runs a setTimeout callback once (ever) + ✅ runs callbacks with arguments after the interval + ✅ doesn't pass the callback to native setTimeout + ✅ throws before allowing infinite recursion + ✅ also clears ticks +FakeTimers advanceTimersByTime + ✅ runs timers in order + ✅ does nothing when no timers have been scheduled +FakeTimers advanceTimersToNextTimer + ✅ runs timers in order + ✅ run correct amount of steps + ✅ setTimeout inside setTimeout + ✅ does nothing when no timers have been scheduled +FakeTimers reset + ✅ resets all pending setTimeouts + ✅ resets all pending setIntervals + ✅ resets all pending ticks callbacks + ✅ resets current advanceTimersByTime time cursor +FakeTimers runOnlyPendingTimers + ✅ runs all timers in order + ✅ does not run timers that were cleared in another timer +FakeTimers useRealTimers + ✅ resets native timer APIs + ✅ resets native process.nextTick when present + ✅ resets native setImmediate when present +FakeTimers useFakeTimers + ✅ resets mock timer APIs + ✅ resets mock process.nextTick when present + ✅ resets mock setImmediate when present +FakeTimers getTimerCount + ✅ returns the correct count + ✅ includes immediates and ticks + ✅ not includes cancelled immediates +``` +### ✅ packages/jest-get-type/src/__tests__/getType.test.ts +``` +.getType() + ✅ null + ✅ undefined + ✅ object + ✅ array + ✅ number + ✅ string + ✅ function + ✅ boolean + ✅ symbol + ✅ regexp + ✅ map + ✅ set + ✅ date + ✅ bigint +``` +### ✅ packages/jest-get-type/src/__tests__/isPrimitive.test.ts +``` +.isPrimitive() + ✅ returns true when given primitive value of: null + ✅ returns true when given primitive value of: undefined + ✅ returns true when given primitive value of: 100 + ✅ returns true when given primitive value of: hello world + ✅ returns true when given primitive value of: true + ✅ returns true when given primitive value of: Symbol(a) + ✅ returns true when given primitive value of: 0 + ✅ returns true when given primitive value of: NaN + ✅ returns true when given primitive value of: Infinity + ✅ returns true when given primitive value of: 1n + ✅ returns false when given non primitive value of: {} + ✅ returns false when given non primitive value of: [] + ✅ returns false when given non primitive value of: undefined + ✅ returns false when given non primitive value of: {} + ✅ returns false when given non primitive value of: {} + ✅ returns false when given non primitive value of: {} + ✅ returns false when given non primitive value of: "2021-01-24T19:22:19.272Z" + ✅ returns false when given non primitive value of: {} +``` +### ✅ packages/jest-globals/src/__tests__/index.ts +``` +✅ throw when directly imported +``` +### ✅ packages/jest-haste-map/src/__tests__/get_mock_name.test.js +``` +getMockName + ✅ extracts mock name from file path +``` +### ✅ packages/jest-haste-map/src/__tests__/includes_dotfiles.test.ts +``` +✅ watchman crawler and node crawler both include dotfiles +``` +### ✅ packages/jest-haste-map/src/__tests__/index.test.js +``` +HasteMap + ✅ exports constants + ✅ creates valid cache file paths + ✅ creates different cache file paths for different roots + ✅ creates different cache file paths for different dependency extractor cache keys + ✅ creates different cache file paths for different hasteImplModulePath cache keys + ✅ creates different cache file paths for different projects + ✅ matches files against a pattern + ✅ ignores files given a pattern + ✅ ignores vcs directories without ignore pattern + ✅ ignores vcs directories with ignore pattern regex + ✅ warn on ignore pattern except for regex + ✅ builds a haste map on a fresh cache + ✅ does not crawl native files even if requested to do so + ✅ retains all files if `retainAllFiles` is specified + ✅ warns on duplicate mock files + ✅ warns on duplicate module ids + ✅ warns on duplicate module ids only once + ✅ throws on duplicate module ids if "throwOnModuleCollision" is set to true + ✅ splits up modules by platform + ✅ does not access the file system on a warm cache with no changes + ✅ only does minimal file system access when files change + ✅ correctly handles file deletions + ✅ correctly handles platform-specific file additions + ✅ correctly handles platform-specific file deletions + ✅ correctly handles platform-specific file renames + ✅ discards the cache when configuration changes + ✅ ignores files that do not exist + ✅ distributes work across workers + ✅ tries to crawl using node as a fallback + ✅ tries to crawl using node as a fallback when promise fails once + ✅ stops crawling when both crawlers fail +HasteMap builds a haste map on a fresh cache with SHA-1s + ✅ uses watchman: false + ✅ uses watchman: true +HasteMap duplicate modules + ✅ recovers when a duplicate file is deleted + ✅ recovers with the correct type when a duplicate file is deleted + ✅ recovers when a duplicate module is renamed +HasteMap file system changes processing + ✅ provides a new set of hasteHS and moduleMap + ✅ handles several change events at once + ✅ does not emit duplicate change events + ✅ emits a change even if a file in node_modules has changed + ✅ correctly tracks changes to both platform-specific versions of a single module name +HasteMap file system changes processing recovery from duplicate module IDs + ✅ recovers when the oldest version of the duplicates is fixed + ✅ recovers when the most recent duplicate is fixed + ✅ ignore directories +``` +### ✅ packages/jest-haste-map/src/__tests__/worker.test.js +``` +worker + ✅ parses JavaScript files and extracts module information + ✅ accepts a custom dependency extractor + ✅ delegates to hasteImplModulePath for getting the id + ✅ parses package.json files as haste packages + ✅ returns an error when a file cannot be accessed + ✅ simply computes SHA-1s when requested (works well with binary data) + ✅ avoids computing dependencies if not requested and Haste does not need it +``` +### ✅ packages/jest-haste-map/src/crawlers/__tests__/node.test.js +``` +node crawler + ✅ crawls for files based on patterns + ✅ updates only changed files + ✅ returns removed files + ✅ uses node fs APIs with incompatible find binary + ✅ uses node fs APIs without find binary + ✅ uses node fs APIs if "forceNodeFilesystemAPI" is set to true, regardless of platform + ✅ completes with empty roots + ✅ completes with fs.readdir throwing an error +node crawler readdir withFileTypes support + ✅ calls lstat for directories and symlinks if readdir withFileTypes is not supported + ✅ avoids calling lstat for directories and symlinks if readdir withFileTypes is supported +``` +### ✅ packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js +``` +watchman watch + ✅ returns a list of all files when there are no clocks + ✅ updates file map and removedFiles when the clock is given + ✅ resets the file map and tracks removedFiles when watchman is fresh + ✅ properly resets the file map when only one watcher is reset + ✅ does not add directory filters to query when watching a ROOT + ✅ SHA-1 requested and available + ✅ SHA-1 requested and NOT available + ✅ source control query +``` +### ✅ packages/jest-haste-map/src/lib/__tests__/dependencyExtractor.test.js +``` +dependencyExtractor + ✅ should not extract dependencies inside comments + ✅ should not extract dependencies inside comments (windows line endings) + ✅ should not extract dependencies inside comments (unicode line endings) + ✅ should extract dependencies from `import` statements + ✅ should extract dependencies from side-effect only `import` statements + ✅ should not extract dependencies from `import type/typeof` statements + ✅ should extract dependencies from `export` statements + ✅ should extract dependencies from `export-from` statements + ✅ should not extract dependencies from `export type/typeof` statements + ✅ should extract dependencies from dynamic `import` calls + ✅ should extract dependencies from `require` calls + ✅ should extract dependencies from `jest.requireActual` calls + ✅ should extract dependencies from `jest.requireMock` calls + ✅ should extract dependencies from `jest.genMockFromModule` calls + ✅ should extract dependencies from `jest.createMockFromModule` calls +``` +### ✅ packages/jest-haste-map/src/lib/__tests__/fast_path.test.js +``` +fastPath.relative + ✅ should get relative paths inside the root + ✅ should get relative paths outside the root + ✅ should get relative paths outside the root when start with same word +fastPath.resolve + ✅ should get the absolute path for paths inside the root + ✅ should get the absolute path for paths outside the root +``` +### ✅ packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js +``` +getPlatformExtension + ✅ should get platform ext +``` +### ✅ packages/jest-haste-map/src/lib/__tests__/isRegExpSupported.test.js +``` +isRegExpSupported + ✅ should return true when passing valid regular expression + ✅ should return false when passing an invalid regular expression +``` +### ✅ packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js +``` +normalizePathSep + ✅ does nothing on posix + ✅ replace slashes on windows +``` +### ✅ packages/jest-jasmine2/src/__tests__/concurrent.test.ts +``` +concurrent + ✅ should add 1 to number + ✅ should add 1 to number + ✅ should add 1 to number +``` +### ✅ packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.ts +``` +expectationResultFactory + ✅ returns the result if passed. + ✅ returns the result if failed. + ✅ returns the result if failed (with `message`). + ✅ returns the result if failed (with `error`). + ✅ returns the error name if the error message is empty + ✅ returns the result if failed (with `error` as a string). + ✅ returns the result if failed (with `error.stack` not as a string). +``` +### ✅ packages/jest-jasmine2/src/__tests__/hooksError.test.ts +``` +beforeEach hooks error throwing + ✅ beforeEach throws an error when "String" is provided as a first argument to it + ✅ beforeEach throws an error when 1 is provided as a first argument to it + ✅ beforeEach throws an error when [] is provided as a first argument to it + ✅ beforeEach throws an error when {} is provided as a first argument to it + ✅ beforeEach throws an error when Symbol(hello) is provided as a first argument to it + ✅ beforeEach throws an error when true is provided as a first argument to it + ✅ beforeEach throws an error when null is provided as a first argument to it + ✅ beforeEach throws an error when undefined is provided as a first argument to it +beforeAll hooks error throwing + ✅ beforeAll throws an error when "String" is provided as a first argument to it + ✅ beforeAll throws an error when 1 is provided as a first argument to it + ✅ beforeAll throws an error when [] is provided as a first argument to it + ✅ beforeAll throws an error when {} is provided as a first argument to it + ✅ beforeAll throws an error when Symbol(hello) is provided as a first argument to it + ✅ beforeAll throws an error when true is provided as a first argument to it + ✅ beforeAll throws an error when null is provided as a first argument to it + ✅ beforeAll throws an error when undefined is provided as a first argument to it +afterEach hooks error throwing + ✅ afterEach throws an error when "String" is provided as a first argument to it + ✅ afterEach throws an error when 1 is provided as a first argument to it + ✅ afterEach throws an error when [] is provided as a first argument to it + ✅ afterEach throws an error when {} is provided as a first argument to it + ✅ afterEach throws an error when Symbol(hello) is provided as a first argument to it + ✅ afterEach throws an error when true is provided as a first argument to it + ✅ afterEach throws an error when null is provided as a first argument to it + ✅ afterEach throws an error when undefined is provided as a first argument to it +afterAll hooks error throwing + ✅ afterAll throws an error when "String" is provided as a first argument to it + ✅ afterAll throws an error when 1 is provided as a first argument to it + ✅ afterAll throws an error when [] is provided as a first argument to it + ✅ afterAll throws an error when {} is provided as a first argument to it + ✅ afterAll throws an error when Symbol(hello) is provided as a first argument to it + ✅ afterAll throws an error when true is provided as a first argument to it + ✅ afterAll throws an error when null is provided as a first argument to it + ✅ afterAll throws an error when undefined is provided as a first argument to it +``` +### ✅ packages/jest-jasmine2/src/__tests__/iterators.test.ts +``` +iterators + ✅ works for arrays + ✅ works for custom iterables + ✅ works for Sets + ✅ works for Maps +``` +### ✅ packages/jest-jasmine2/src/__tests__/itTestError.test.ts +``` +test/it error throwing + ✅ it throws error with missing callback function + ✅ it throws an error when first argument isn't a string + ✅ it throws an error when callback function is not a function + ✅ test throws error with missing callback function + ✅ test throws an error when first argument isn't a string + ✅ test throws an error when callback function is not a function +``` +### ✅ packages/jest-jasmine2/src/__tests__/itToTestAlias.test.ts +``` +✅ global.test +``` +### ✅ packages/jest-jasmine2/src/__tests__/pTimeout.test.ts +``` +pTimeout + ✅ calls `clearTimeout` and resolves when `promise` resolves. + ✅ calls `clearTimeout` and rejects when `promise` rejects. + ✅ calls `onTimeout` on timeout. +``` +### ✅ packages/jest-jasmine2/src/__tests__/queueRunner.test.ts +``` +queueRunner + ✅ runs every function in the queue. + ✅ exposes `fail` to `next`. + ✅ passes errors to `onException`. + ✅ passes an error to `onException` on timeout. + ✅ calls `fail` with arguments + ✅ calls `fail` when done(error) is invoked +``` +### ✅ packages/jest-jasmine2/src/__tests__/reporter.test.ts +``` +Jasmine2Reporter + ✅ reports nested suites +``` +### ✅ packages/jest-jasmine2/src/__tests__/Suite.test.ts +``` +Suite + ✅ doesn't throw on addExpectationResult when there are no children +``` +### ✅ packages/jest-jasmine2/src/__tests__/todoError.test.ts +``` +test/it.todo error throwing + ✅ it throws error when given no arguments + ✅ it throws error when given more than one argument + ✅ it throws error when given none string description +``` +### ✅ packages/jest-leak-detector/src/__tests__/index.test.ts +``` +✅ complains if the value is a primitive +✅ does not show the GC if hidden +✅ does not hide the GC if visible +✅ correctly checks simple leaks +✅ tests different objects +✅ correctly checks more complex leaks +``` +### ✅ packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceable.test.ts +``` +✅ returns the same value for primitive or function values +✅ convert accessor descriptor into value descriptor +✅ shuold not skips non-enumerables +✅ copies symbols +✅ copies arrays as array objects +✅ handles cyclic dependencies +✅ Copy Map +✅ Copy cyclic Map +✅ return same value for built-in object type except array, map and object +✅ should copy object symbol key property +✅ should set writable, configurable to true +``` +### ✅ packages/jest-matcher-utils/src/__tests__/deepCyclicCopyReplaceableDom.test.ts +``` +✅ should copy dom element +✅ should copy complex element +``` +### ✅ packages/jest-matcher-utils/src/__tests__/index.test.ts +``` +stringify() + ✅ [] + ✅ {} + ✅ 1 + ✅ 0 + ✅ 1.5 + ✅ null + ✅ undefined + ✅ "abc" + ✅ Symbol(abc) + ✅ NaN + ✅ Infinity + ✅ -Infinity + ✅ /ab\.c/gi + ✅ 1n + ✅ 0n + ✅ circular references + ✅ toJSON error + ✅ toJSON errors when comparing two objects + ✅ reduces maxDepth if stringifying very large objects +ensureNumbers() + ✅ dont throw error when variables are numbers + ✅ throws error when expected is not a number (backward compatibility) + ✅ throws error when received is not a number (backward compatibility) +ensureNumbers() with options + ✅ promise empty isNot false received + ✅ promise empty isNot true expected + ✅ promise rejects isNot false expected + ✅ promise rejects isNot true received + ✅ promise resolves isNot false received + ✅ promise resolves isNot true expected +ensureNoExpected() + ✅ dont throw error when undefined + ✅ throws error when expected is not undefined with matcherName + ✅ throws error when expected is not undefined with matcherName and options +diff + ✅ forwards to jest-diff + ✅ two booleans + ✅ two numbers + ✅ two bigints +pluralize() + ✅ one + ✅ two + ✅ 20 +getLabelPrinter + ✅ 0 args + ✅ 1 empty string + ✅ 1 non-empty string + ✅ 2 equal lengths + ✅ 2 unequal lengths + ✅ returns incorrect padding if inconsistent arg is shorter + ✅ throws if inconsistent arg is longer +matcherHint + ✅ expectedColor + ✅ receivedColor + ✅ secondArgumentColor +``` +### ✅ packages/jest-matcher-utils/src/__tests__/printDiffOrStringify.test.ts +``` +printDiffOrStringify + ✅ expected is empty and received is single line + ✅ expected is multi line and received is empty + ✅ expected and received are single line with multiple changes + ✅ expected and received are multi line with trailing spaces + ✅ has no common after clean up chaff multiline + ✅ has no common after clean up chaff one-line + ✅ object contain readonly symbol key object +printDiffOrStringify MAX_DIFF_STRING_LENGTH + ✅ both are less + ✅ expected is more + ✅ received is more +printDiffOrStringify asymmetricMatcher + ✅ minimal test + ✅ jest asymmetricMatcher + ✅ custom asymmetricMatcher + ✅ nested object + ✅ array + ✅ object in array + ✅ map + ✅ circular object + ✅ transitive circular + ✅ circular array + ✅ circular map +``` +### ✅ packages/jest-matcher-utils/src/__tests__/Replaceable.test.ts +``` +Replaceable constructor + ✅ init with object + ✅ init with array + ✅ init with Map + ✅ init with other type should throw error +Replaceable get + ✅ get object item + ✅ get array item + ✅ get Map item +Replaceable set + ✅ set object item + ✅ set array item + ✅ set Map item +Replaceable forEach + ✅ object forEach + ✅ array forEach + ✅ map forEach + ✅ forEach should ignore nonenumerable property +Replaceable isReplaceable + ✅ should return true if two object types equal and support + ✅ should return false if two object types not equal + ✅ should return false if object types not support +``` +### ✅ packages/jest-message-util/src/__tests__/messages.test.ts +``` +✅ should exclude jasmine from stack trace for Unix paths. +✅ .formatExecError() +✅ formatStackTrace should strip node internals +✅ should not exclude vendor from stack trace +✅ retains message in babel code frame error +✅ codeframe +✅ no codeframe +✅ no stack +formatStackTrace + ✅ prints code frame and stacktrace + ✅ does not print code frame when noCodeFrame = true + ✅ does not print codeframe when noStackTrace = true +``` +### ✅ packages/jest-mock/src/__tests__/index.test.ts +``` +moduleMocker getMetadata + ✅ returns the function `name` property + ✅ mocks constant values + ✅ does not retrieve metadata for arrays + ✅ does not retrieve metadata for undefined + ✅ does not retrieve metadata for null + ✅ retrieves metadata for ES6 classes + ✅ retrieves synchronous function metadata + ✅ retrieves asynchronous function metadata + ✅ retrieves metadata for object literals and it's members + ✅ retrieves Date object metadata +moduleMocker generateFromMetadata + ✅ forwards the function name property + ✅ fixes illegal function name properties + ✅ special cases the mockConstructor name + ✅ wont interfere with previous mocks on a shared prototype + ✅ does not mock non-enumerable getters + ✅ mocks getters of ES modules + ✅ mocks ES2015 non-enumerable methods + ✅ mocks ES2015 non-enumerable static properties and methods + ✅ mocks methods in all the prototype chain (null prototype) + ✅ does not mock methods from Object.prototype + ✅ does not mock methods from Object.prototype (in mock context) + ✅ does not mock methods from Function.prototype + ✅ does not mock methods from Function.prototype (in mock context) + ✅ does not mock methods from RegExp.prototype + ✅ does not mock methods from RegExp.prototype (in mock context) + ✅ mocks methods that are bound multiple times + ✅ mocks methods that are bound after mocking + ✅ mocks regexp instances + ✅ mocks functions with numeric names + ✅ mocks the method in the passed object itself + ✅ should delete previously inexistent methods when restoring + ✅ supports mock value returning undefined + ✅ supports mock value once returning undefined + ✅ mockReturnValueOnce mocks value just once + ✅ supports mocking resolvable async functions + ✅ supports mocking resolvable async functions only once + ✅ supports mocking rejectable async functions + ✅ supports mocking rejectable async functions only once + ✅ tracks thrown errors without interfering with other tracking + ✅ a call that throws undefined is tracked properly + ✅ results of recursive calls are tracked properly + ✅ test results of recursive calls from within the recursive call + ✅ call mockClear inside recursive mock +moduleMocker generateFromMetadata mocked functions + ✅ tracks calls to mocks + ✅ tracks instances made by mocks + ✅ supports clearing mock calls + ✅ supports clearing mocks + ✅ supports clearing all mocks + ✅ supports resetting mock return values + ✅ supports resetting single use mock return values + ✅ supports resetting mock implementations + ✅ supports resetting single use mock implementations + ✅ supports resetting all mocks + ✅ maintains function arity +moduleMocker generateFromMetadata return values + ✅ tracks return values + ✅ tracks mocked return values + ✅ supports resetting return values +moduleMocker generateFromMetadata invocationCallOrder + ✅ tracks invocationCallOrder made by mocks + ✅ supports clearing mock invocationCallOrder + ✅ supports clearing all mocks invocationCallOrder + ✅ handles a property called `prototype` +moduleMocker getMockImplementation + ✅ should mock calls to a mock function +moduleMocker mockImplementationOnce + ✅ should mock constructor + ✅ should mock single call to a mock function + ✅ should fallback to default mock function when no specific mock is available +moduleMocker + ✅ mockReturnValue does not override mockImplementationOnce + ✅ mockImplementation resets the mock + ✅ should recognize a mocked function + ✅ default mockName is jest.fn() + ✅ mockName sets the mock name + ✅ mockName gets reset by mockReset + ✅ mockName gets reset by mockRestore + ✅ mockName is not reset by mockClear +moduleMocker spyOn + ✅ should work + ✅ should throw on invalid input + ✅ supports restoring all spies + ✅ should work with getters +moduleMocker spyOnProperty + ✅ should work - getter + ✅ should work - setter + ✅ should throw on invalid input + ✅ supports restoring all spies + ✅ should work with getters on the prototype chain + ✅ should work with setters on the prototype chain + ✅ supports restoring all spies on the prototype chain +``` +### ✅ packages/jest-regex-util/src/__tests__/index.test.ts +``` +replacePathSepForRegex() posix + ✅ should return the path +replacePathSepForRegex() win32 + ✅ should replace POSIX path separators + ✅ should escape Windows path separators + ✅ should not escape an escaped dot + ✅ should not escape an escaped regexp symbol + ✅ should escape Windows path separators inside groups + ✅ should escape Windows path separator at the beginning + ✅ should not escape several already escaped path separators +``` +### ✅ packages/jest-repl/src/__tests__/jest_repl.test.js +``` +Repl cli + ✅ runs without errors +``` +### ✅ packages/jest-repl/src/__tests__/runtime_cli.test.js +``` +Runtime CLI + ✅ fails with no path + ✅ displays script output + ✅ always disables automocking + ✅ throws script errors +``` +### ✅ packages/jest-reporters/src/__tests__/CoverageReporter.test.js +``` +onRunComplete + ✅ getLastError() returns an error when threshold is not met for global + ✅ getLastError() returns an error when threshold is not met for file + ✅ getLastError() returns `undefined` when threshold is met + ✅ getLastError() returns an error when threshold is not met for non-covered file + ✅ getLastError() returns an error when threshold is not met for directory + ✅ getLastError() returns `undefined` when threshold is met for directory + ✅ getLastError() returns an error when there is no coverage data for a threshold + ✅ getLastError() returns 'undefined' when global threshold group + is empty because PATH and GLOB threshold groups have matched all the + files in the coverage data. + ✅ getLastError() returns 'undefined' when file and directory path + threshold groups overlap + ✅ that if globs or paths are specified alongside global, coverage + data for matching paths will be subtracted from overall coverage + and thresholds will be applied independently + ✅ that files are matched by all matching threshold groups + ✅ that it passes custom options when creating reporters +``` +### ✅ packages/jest-reporters/src/__tests__/CoverageWorker.test.js +``` +✅ resolves to the result of generateEmptyCoverage upon success +✅ throws errors on invalid JavaScript +``` +### ✅ packages/jest-reporters/src/__tests__/DefaultReporter.test.js +``` +✅ normal output, everything goes to stdout +✅ when using stderr as output, no stdout call is made +``` +### ✅ packages/jest-reporters/src/__tests__/generateEmptyCoverage.test.js +``` +generateEmptyCoverage + ✅ generates an empty coverage object for a file without running it + ✅ generates a null coverage result when using /* istanbul ignore file */ + ✅ generates a null coverage result when collectCoverage global config is false +``` +### ✅ packages/jest-reporters/src/__tests__/getResultHeader.test.js +``` +✅ should call `terminal-link` correctly +✅ should render the terminal link +✅ should display test time for slow test +✅ should not display test time for fast test +``` +### ✅ packages/jest-reporters/src/__tests__/getSnapshotStatus.test.js +``` +✅ Retrieves the snapshot status +✅ Shows no snapshot updates if all snapshots matched +✅ Retrieves the snapshot status after a snapshot update +``` +### ✅ packages/jest-reporters/src/__tests__/getSnapshotSummary.test.js +``` +✅ creates a snapshot summary +✅ creates a snapshot summary after an update +✅ creates a snapshot summary with multiple snapshot being written/updated +✅ returns nothing if there are no updates +``` +### ✅ packages/jest-reporters/src/__tests__/getWatermarks.test.ts +``` +getWatermarks + ✅ that watermarks use thresholds as upper target + ✅ that watermarks are created always created +``` +### ✅ packages/jest-reporters/src/__tests__/NotifyReporter.test.ts +``` +✅ test always +✅ test success +✅ test change +✅ test success-change +✅ test failure-change +✅ test always with rootDir +✅ test success with rootDir +✅ test change with rootDir +✅ test success-change with rootDir +✅ test failure-change with rootDir +✅ test always with moduleName +✅ test success with moduleName +✅ test change with moduleName +✅ test success-change with moduleName +✅ test failure-change with moduleName +node-notifier is an optional dependency + ✅ without node-notifier uses mock function that throws an error + ✅ throws the error when require throws an unexpected error + ✅ uses node-notifier when it is available +``` +### ✅ packages/jest-reporters/src/__tests__/SummaryReporter.test.js +``` +✅ snapshots needs update with npm test +✅ snapshots needs update with yarn test +✅ snapshots all have results (no update) +✅ snapshots all have results (after update) +``` +### ✅ packages/jest-reporters/src/__tests__/utils.test.ts +``` +wrapAnsiString() + ✅ wraps a long string containing ansi chars + ✅ returns the string unaltered if given a terminal width of zero +trimAndFormatPath() + ✅ trims dirname + ✅ trims dirname (longer line width) + ✅ trims dirname and basename + ✅ does not trim anything + ✅ split at the path.sep index +printDisplayName + ✅ should default displayName color to white when displayName is a string + ✅ should default displayName color to white when color is not a valid value + ✅ should correctly print the displayName when color and name are valid values +``` +### ✅ packages/jest-reporters/src/__tests__/VerboseReporter.test.js +``` +groupTestsBySuites + ✅ should handle empty results + ✅ should group A1 in A + ✅ should group A1 in A; B1 in B + ✅ should group A1, A2 in A + ✅ should group A1, A2 in A; B1, B2 in B + ✅ should group AB1 in AB + ✅ should group AB1, AB2 in AB + ✅ should group A1 in A; AB1 in AB + ✅ should group AB1 in AB; A1 in A + ✅ should group AB1 in AB; CD1 in CD + ✅ should group ABC1 in ABC; BC1 in BC; D1 in D; A1 in A +``` +### ✅ packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.ts +``` +✅ resolves no dependencies for non-existent path +✅ resolves dependencies for existing path +✅ includes the mocks of dependencies as dependencies +✅ resolves dependencies for scoped packages +✅ resolves no inverse dependencies for empty paths set +✅ resolves no inverse dependencies for set of non-existent paths +✅ resolves inverse dependencies for existing path +✅ resolves inverse dependencies of mock +✅ resolves inverse dependencies from available snapshot +✅ resolves dependencies correctly when dependency resolution fails +✅ resolves dependencies correctly when mock dependency resolution fails +``` +### ✅ packages/jest-resolve/src/__tests__/isBuiltinModule.test.ts +``` +isBuiltinModule + ✅ should return true for the `path` module + ✅ should return false for the `chalk` module + ✅ should return true for the `_http_common` module + ✅ should return false for any internal node builtins +``` +### ✅ packages/jest-resolve/src/__tests__/resolve.test.ts +``` +isCoreModule + ✅ returns false if `hasCoreModules` is false. + ✅ returns true if `hasCoreModules` is true and `moduleName` is a core module. + ✅ returns false if `hasCoreModules` is true and `moduleName` is not a core module. + ✅ returns false if `hasCoreModules` is true and `moduleNameMapper` alias a module same name with core module +findNodeModule + ✅ is possible to override the default resolver + ✅ passes packageFilter to the resolve module when using the default resolver +resolveModule + ✅ is possible to resolve node modules + ✅ is possible to resolve node modules with custom extensions + ✅ is possible to resolve node modules with custom extensions and platforms + ✅ is possible to resolve node modules by resolving their realpath + ✅ is possible to specify custom resolve paths + ✅ does not confuse directories with files +getMockModule + ✅ is possible to use custom resolver to resolve deps inside mock modules with moduleNameMapper +nodeModulesPaths + ✅ provides custom module paths after node_modules +Resolver.getModulePaths() -> nodeModulesPaths() + ✅ can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms + ✅ can resolve node modules relative to absolute paths in "moduleDirectories" on Posix platforms +``` +### ✅ packages/jest-runner/src/__tests__/testRunner.test.ts +``` +✅ injects the serializable module map into each worker in watch mode +✅ assign process.env.JEST_WORKER_ID = 1 when in runInBand mode +``` +### ✅ packages/jest-runtime/src/__tests__/instrumentation.test.ts +``` +✅ instruments files +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_create_mock_from_module.test.js +``` +Runtime createMockFromModule + ✅ does not cause side effects in the rest of the module system when generating a mock + ✅ resolves mapped modules correctly +Runtime + ✅ creates mock objects in the right environment +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_environment.test.js +``` +Runtime requireModule + ✅ emulates a node stack trace during module load + ✅ emulates a node stack trace during function execution +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_internal_module.test.js +``` +Runtime internalModule + ✅ loads modules and applies transforms + ✅ loads internal modules without applying transforms + ✅ loads JSON modules and applies transforms + ✅ loads internal JSON modules without applying transforms +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_jest_fn.js +``` +Runtime jest.fn + ✅ creates mock functions + ✅ creates mock functions with mock implementations +Runtime jest.isMockFunction + ✅ recognizes a mocked function +Runtime jest.clearAllMocks + ✅ clears all mocks +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js +``` +Runtime jest.spyOn + ✅ calls the original function +Runtime jest.spyOnProperty + ✅ calls the original function +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_mock.test.js +``` +Runtime jest.mock + ✅ uses explicitly set mocks instead of automocking + ✅ sets virtual mock for non-existing module required from same directory + ✅ sets virtual mock for non-existing module required from different directory +Runtime jest.setMock + ✅ uses explicitly set mocks instead of automocking +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_module_directories.test.js +``` +Runtime + ✅ uses configured moduleDirectories + ✅ resolves packages + ✅ finds closest module from moduleDirectories + ✅ only checks the configured directories +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_node_path.test.js +``` +Runtime + ✅ uses NODE_PATH to find modules + ✅ uses modulePaths to find modules + ✅ finds modules in NODE_PATH containing multiple paths + ✅ does not find modules if NODE_PATH is relative +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_actual.test.js +``` +Runtime requireActual + ✅ requires node module when manual mock exists + ✅ requireActual with moduleNameMapper +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_cache.test.js +``` +Runtime require.cache + ✅ require.cache returns loaded module list as native Nodejs require does + ✅ require.cache is tolerant readonly +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_mock.test.js +``` +Runtime requireMock + ✅ uses manual mocks before attempting to automock + ✅ can resolve modules that are only referenced from mocks + ✅ stores and re-uses manual mock exports + ✅ automocks haste modules without a manual mock + ✅ automocks relative-path modules without a file extension + ✅ automocks relative-path modules with a file extension + ✅ just falls back when loading a native module + ✅ stores and re-uses automocked haste exports + ✅ stores and re-uses automocked relative-path modules + ✅ multiple node core modules returns correct module + ✅ throws on non-existent haste modules + ✅ uses manual mocks when using a custom resolver + ✅ provides `require.main` in mock +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_module_no_ext.test.js +``` +Runtime requireModule with no extension + ✅ throws error pointing out file with extension +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js +``` +transitive dependencies + ✅ mocks a manually mocked and mapped module + ✅ unmocks transitive dependencies in node_modules by default + ✅ unmocks transitive dependencies in node_modules when using unmock + ✅ unmocks transitive dependencies in node_modules by default when using both patterns and unmock + ✅ mocks deep dependencies when using unmock + ✅ does not mock deep dependencies when using deepUnmock +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js +``` +✅ mocks modules by default when using automocking +✅ doesn't mock modules when explicitly unmocked when using automocking +✅ doesn't mock modules when explicitly unmocked via a different name +✅ doesn't mock modules when disableAutomock() has been called +✅ uses manual mock when automocking on and mock is available +✅ does not use manual mock when automocking is off and a real module is available +✅ resolves mapped module names and unmocks them by default +✅ automocking is disabled by default +✅ unmocks modules in config.unmockedModulePathPatterns for tests with automock enabled when automock is false +✅ unmocks virtual mocks after they have been mocked previously +resetModules + ✅ resets all the modules +isolateModules + ✅ keeps it's registry isolated from global one + ✅ resets all modules after the block + ✅ resets module after failing + ✅ cannot nest isolateModules blocks + ✅ can call resetModules within a isolateModules block +isolateModules can use isolateModules from a beforeEach block + ✅ can use the required module from beforeEach and re-require it +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_module.test.js +``` +Runtime requireModule + ✅ finds haste modules + ✅ provides `module` to modules + ✅ provides `module.parent` to modules + ✅ `module.parent` should be undefined for entrypoints + ✅ resolve module.parent.require correctly + ✅ resolve module.parent.filename correctly + ✅ provides `module.loaded` to modules + ✅ provides `module.filename` to modules + ✅ provides `module.paths` to modules + ✅ provides `require.main` to modules + ✅ throws on non-existent haste modules + ✅ finds relative-path modules without file extension + ✅ finds relative-path modules with file extension + ✅ throws on non-existent relative-path modules + ✅ finds node core built-in modules + ✅ finds and loads JSON files without file extension + ✅ finds and loads JSON files with file extension + ✅ requires a JSON file twice successfully + ✅ provides manual mock when real module doesnt exist + ✅ doesn't override real modules with manual mocks when explicitly unmocked + ✅ resolves haste packages properly + ✅ resolves platform extensions based on the default platform + ✅ finds modules encoded in UTF-8 *with BOM* + ✅ finds and loads JSON files encoded in UTF-8 *with BOM* + ✅ should export a constructable Module class + ✅ caches Module correctly +Runtime requireModule on node >=12.12.0 + ✅ overrides module.createRequire +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_require_resolve.test.ts +``` +Runtime require.resolve + ✅ resolves a module path + ✅ resolves a module path with moduleNameMapper +Runtime require.resolve with the jest-resolve-outside-vm-option + ✅ forwards to the real Node require in an internal context + ✅ ignores the option in an external context + ✅ does not understand a self-constructed outsideJestVmPath in an external context +``` +### ✅ packages/jest-runtime/src/__tests__/runtime_wrap.js +``` +Runtime wrapCodeInModuleWrapper + ✅ generates the correct args for the module wrapper + ✅ injects "extra globals" +``` +### ✅ packages/jest-runtime/src/__tests__/Runtime-sourceMaps.test.js +``` +Runtime requireModule + ✅ installs source maps if available +``` +### ✅ packages/jest-runtime/src/__tests__/Runtime-statics.test.js +``` +Runtime statics + ✅ Runtime.createHasteMap passes correct ignore files to HasteMap + ✅ Runtime.createHasteMap passes correct ignore files to HasteMap in watch mode +``` +### ✅ packages/jest-serializer/src/__tests__/index.test.ts +``` +Using V8 implementation + ✅ throws the error with an invalid serialization +Using V8 implementation Object 0 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 1 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 2 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 3 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 4 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 5 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 6 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +Using V8 implementation Object 7 + ✅ serializes/deserializes in memory + ✅ serializes/deserializes in disk +``` +### ✅ packages/jest-snapshot/src/__tests__/dedentLines.test.ts +``` +dedentLines non-null + ✅ no lines + ✅ one line empty string + ✅ one line empty object + ✅ one line self-closing element + ✅ object value empty string + ✅ object value string includes double-quote marks + ✅ markup with props and text + ✅ markup with components as props +dedentLines null + ✅ object key multi-line + ✅ object value multi-line + ✅ object key and value multi-line + ✅ markup prop multi-line + ✅ markup prop component with multi-line text + ✅ markup text multi-line + ✅ markup text multiple lines + ✅ markup unclosed self-closing start tag + ✅ markup unclosed because no end tag +``` +### ✅ packages/jest-snapshot/src/__tests__/InlineSnapshots.test.ts +``` +✅ saveInlineSnapshots() replaces empty function call with a template literal +✅ saveInlineSnapshots() without prettier leaves formatting outside of snapshots alone +✅ saveInlineSnapshots() can handle typescript without prettier +✅ saveInlineSnapshots() can handle tsx without prettier +✅ saveInlineSnapshots() can handle flow and jsx without prettier +✅ saveInlineSnapshots() can use prettier to fix formatting for whole file +✅ saveInlineSnapshots() replaces existing template literal - babel parser +✅ saveInlineSnapshots() replaces existing template literal - flow parser +✅ saveInlineSnapshots() replaces existing template literal - typescript parser +✅ saveInlineSnapshots() replaces existing template literal with property matchers +✅ saveInlineSnapshots() creates template literal with property matchers +✅ saveInlineSnapshots() creates template literal with property matchers +✅ saveInlineSnapshots() throws if frame does not match +✅ saveInlineSnapshots() throws if multiple calls to to the same location +✅ saveInlineSnapshots() uses escaped backticks +✅ saveInlineSnapshots() works with non-literals in expect call +✅ saveInlineSnapshots() indents multi-line snapshots with spaces +✅ saveInlineSnapshots() does not re-indent error snapshots +✅ saveInlineSnapshots() does not re-indent already indented snapshots +✅ saveInlineSnapshots() indents multi-line snapshots with tabs +✅ saveInlineSnapshots() indents snapshots after prettier reformats +✅ saveInlineSnapshots() does not indent empty lines +``` +### ✅ packages/jest-snapshot/src/__tests__/matcher.test.ts +``` +✅ matcher returns matcher name, expected and actual values +``` +### ✅ packages/jest-snapshot/src/__tests__/mockSerializer.test.ts +``` +✅ mock with 0 calls and default name +✅ mock with 2 calls, 1 return, 1 throw +✅ mock with 0 calls and default name in React element +✅ mock with 0 calls and non-default name +✅ mock with 1 calls and non-default name via new in object +✅ mock with 1 calls in React element +✅ mock with 2 calls +✅ indent option +✅ min option +✅ maxDepth option +``` +### ✅ packages/jest-snapshot/src/__tests__/printSnapshot.test.ts +``` +chalk + ✅ level 0 + ✅ level 1 + ✅ level 2 + ✅ level 3 +matcher error toMatchInlineSnapshot + ✅ Expected properties must be an object (non-null) without snapshot + ✅ Expected properties must be an object (null) with snapshot + ✅ Inline snapshot must be a string + ✅ Snapshot matchers cannot be used with not +matcher error toMatchSnapshot + ✅ Expected properties must be an object (non-null) + ✅ Expected properties must be an object (null) with hint + ✅ Expected properties must be an object (null) without hint + ✅ Snapshot state must be initialized +matcher error toMatchSnapshot received value must be an object + ✅ (non-null) + ✅ (null) +matcher error toThrowErrorMatchingInlineSnapshot + ✅ Inline snapshot must be a string + ✅ Snapshot state must be initialized +matcher error toThrowErrorMatchingSnapshot + ✅ Received value must be a function + ✅ Snapshot matchers cannot be used with not +other error toThrowErrorMatchingSnapshot + ✅ Received function did not throw +pass false toMatchInlineSnapshot with properties equals false + ✅ with snapshot + ✅ without snapshot +pass false toMatchInlineSnapshot with properties + ✅ equals true +pass false toMatchSnapshot + ✅ New snapshot was not written (multi line) + ✅ New snapshot was not written (single line) +pass false toMatchSnapshot with properties equals false + ✅ isLineDiffable false + ✅ isLineDiffable true +pass false toMatchSnapshot with properties + ✅ equals true +pass false toThrowErrorMatchingInlineSnapshot + ✅ with snapshot +pass true toMatchSnapshot + ✅ without properties +printPropertiesAndReceived + ✅ omit missing properties +printSnapshotAndReceived backtick + ✅ single line expected and received +printSnapshotAndReceived empty string + ✅ expected and received single line + ✅ received and expected multi line +printSnapshotAndReceived escape + ✅ double quote marks in string + ✅ backslash in multi line string + ✅ backslash in single line string + ✅ regexp +printSnapshotAndReceived expand + ✅ false + ✅ true +printSnapshotAndReceived + ✅ fallback to line diff + ✅ multi line small change in one line and other is unchanged + ✅ multi line small changes + ✅ single line large changes +printSnapshotAndReceived has no common after clean up chaff + ✅ array + ✅ string single line +printSnapshotAndReceived MAX_DIFF_STRING_LENGTH unquoted + ✅ both are less + ✅ expected is more + ✅ received is more +printSnapshotAndReceived MAX_DIFF_STRING_LENGTH quoted + ✅ both are less + ✅ expected is more + ✅ received is more +printSnapshotAndReceived isLineDiffable false + ✅ asymmetric matcher + ✅ boolean + ✅ date + ✅ error + ✅ function + ✅ number +printSnapshotAndReceived isLineDiffable true + ✅ array + ✅ object + ✅ single line expected and received + ✅ single line expected and multi line received +printSnapshotAndReceived ignore indentation + ✅ markup delete + ✅ markup fall back + ✅ markup insert +printSnapshotAndReceived ignore indentation object + ✅ delete + ✅ insert +printSnapshotAndReceived without serialize + ✅ backtick single line expected and received + ✅ backtick single line expected and multi line received + ✅ has no common after clean up chaff multi line + ✅ has no common after clean up chaff single line + ✅ prettier/pull/5590 +``` +### ✅ packages/jest-snapshot/src/__tests__/SnapshotResolver.test.ts +``` +defaults + ✅ returns cached object if called multiple times + ✅ resolveSnapshotPath() + ✅ resolveTestPath() +custom resolver in project config + ✅ returns cached object if called multiple times + ✅ resolveSnapshotPath() + ✅ resolveTestPath() +malformed custom resolver in project config + ✅ missing resolveSnapshotPath throws + ✅ missing resolveTestPath throws + ✅ missing testPathForConsistencyCheck throws + ✅ inconsistent functions throws +``` +### ✅ packages/jest-snapshot/src/__tests__/throwMatcher.test.ts +``` +✅ throw matcher can take func +throw matcher from promise + ✅ can take error + ✅ can take custom error +``` +### ✅ packages/jest-snapshot/src/__tests__/utils.test.ts +``` +✅ keyToTestName() +✅ testNameToKey +✅ saveSnapshotFile() works with +✅ saveSnapshotFile() works with +✅ getSnapshotData() throws when no snapshot version +✅ getSnapshotData() throws for older snapshot version +✅ getSnapshotData() throws for newer snapshot version +✅ getSnapshotData() does not throw for when updating +✅ getSnapshotData() marks invalid snapshot dirty when updating +✅ getSnapshotData() marks valid snapshot not dirty when updating +✅ escaping +✅ serialize handles \r\n +ExtraLineBreaks + ✅ 0 empty string + ✅ 1 line has double quote marks at edges + ✅ 1 line has spaces at edges + ✅ 2 lines both are blank + ✅ 2 lines have double quote marks at edges + ✅ 2 lines first is blank + ✅ 2 lines last is blank +removeLinesBeforeExternalMatcherTrap + ✅ contains external matcher trap + ✅ doesn't contain external matcher trap +DeepMerge with property matchers + ✅ Correctly merges a nested object + ✅ Correctly merges an object with an array of objects + ✅ Correctly merges an object with an array of strings + ✅ Correctly merges an array of objects + ✅ Correctly merges an array of arrays +``` +### ✅ packages/jest-source-map/src/__tests__/getCallsite.test.ts +``` +getCallsite + ✅ without source map + ✅ ignores errors when fs throws + ✅ reads source map file to determine line and column +``` +### ✅ packages/jest-test-result/src/__tests__/formatTestResults.test.ts +``` +formatTestResults + ✅ includes test full name +``` +### ✅ packages/jest-test-sequencer/src/__tests__/test_sequencer.test.js +``` +✅ sorts by file size if there is no timing information +✅ sorts based on timing information +✅ sorts based on failures and timing information +✅ sorts based on failures, timing information and file size +✅ writes the cache based on results without existing cache +✅ returns failed tests in sorted order +✅ writes the cache based on the results +✅ works with multiple contexts +``` +### ✅ packages/jest-transform/src/__tests__/ScriptTransformer.test.ts +``` +ScriptTransformer + ✅ transforms a file properly + ✅ does not transform Node core modules + ✅ throws an error if `process` doesn't return a string or an objectcontaining `code` key with processed string + ✅ throws an error if `process` doesn't defined + ✅ throws an error if createTransformer returns object without `process` method + ✅ shouldn't throw error without process method. But with corrent createTransformer method + ✅ uses the supplied preprocessor + ✅ uses multiple preprocessors + ✅ writes source map if preprocessor supplies it + ✅ writes source map if preprocessor inlines it + ✅ warns of unparseable inlined source maps from the preprocessor + ✅ writes source maps if given by the transformer + ✅ does not write source map if not given by the transformer + ✅ should write a source map for the instrumented file when transformed + ✅ should write a source map for the instrumented file when not transformed + ✅ passes expected transform options to getCacheKey + ✅ creates transformer with config + ✅ reads values from the cache + ✅ reads values from the cache when the file contains colons + ✅ should reuse the value from in-memory cache which is set by custom transformer + ✅ does not reuse the in-memory cache between different projects + ✅ preload transformer when using `preloadTransformer` +``` +### ✅ packages/jest-transform/src/__tests__/shouldInstrument.test.ts +``` +shouldInstrument should return true + ✅ when testRegex is provided and file is not a test file + ✅ when more than one testRegex is provided and filename is not a test file + ✅ when testMatch is provided and file is not a test file + ✅ when testPathIgnorePatterns is provided and file is not a test file + ✅ when more than one testPathIgnorePatterns is provided and filename is not a test file + ✅ when testRegex and testPathIgnorePatterns are provided and file is not a test file + ✅ when testMatch and testPathIgnorePatterns are provided and file is not a test file + ✅ should return true when file is in collectCoverageOnlyFrom when provided + ✅ should return true when filename matches collectCoverageFrom + ✅ should return true if the file is not in coveragePathIgnorePatterns + ✅ should return true if file is a testfile but forceCoverageMatch is set +shouldInstrument should return false + ✅ if collectCoverage is falsy + ✅ when testRegex is provided and filename is a test file + ✅ when more than one testRegex is provided and filename matches one of the patterns + ✅ when testMatch is provided and file is a test file + ✅ when testRegex and testPathIgnorePatterns are provided and filename is a test file + ✅ when testMatch and testPathIgnorePatterns are provided and file is a test file + ✅ when file is not in collectCoverageOnlyFrom when provided + ✅ when filename does not match collectCoverageFrom + ✅ if the file is in coveragePathIgnorePatterns + ✅ if file is in mock patterns + ✅ if file is a globalSetup file + ✅ if file is globalTeardown file + ✅ if file is in setupFiles + ✅ if file is in setupFilesAfterEnv +``` +### ✅ packages/jest-util/src/__tests__/createProcessObject.test.ts +``` +✅ creates a process object that looks like the original one +✅ fakes require("process") so it is equal to "global.process" +✅ checks that process.env works as expected on Linux platforms +✅ checks that process.env works as expected in Windows platforms +``` +### ✅ packages/jest-util/src/__tests__/deepCyclicCopy.test.ts +``` +✅ returns the same value for primitive or function values +✅ does not execute getters/setters, but copies them +✅ copies symbols +✅ copies arrays as array objects +✅ handles cyclic dependencies +✅ uses the blacklist to avoid copying properties on the first level +✅ does not keep the prototype by default when top level is object +✅ does not keep the prototype by default when top level is array +✅ does not keep the prototype of arrays when keepPrototype = false +✅ keeps the prototype of arrays when keepPrototype = true +✅ does not keep the prototype for objects when keepPrototype = false +✅ keeps the prototype for objects when keepPrototype = true +``` +### ✅ packages/jest-util/src/__tests__/errorWithStack.test.ts +``` +ErrorWithStack + ✅ calls Error.captureStackTrace with given callsite when capture exists +``` +### ✅ packages/jest-util/src/__tests__/formatTime.test.ts +``` +✅ defaults to milliseconds +✅ formats seconds properly +✅ formats milliseconds properly +✅ formats microseconds properly +✅ formats nanoseconds properly +✅ interprets lower than lowest powers as nanoseconds +✅ interprets higher than highest powers as seconds +✅ interprets non-multiple-of-3 powers as next higher prefix +✅ formats the quantity properly when pad length is lower +✅ formats the quantity properly when pad length is equal +✅ left pads the quantity properly when pad length is higher +``` +### ✅ packages/jest-util/src/__tests__/globsToMatcher.test.ts +``` +✅ works like micromatch with only positive globs +✅ works like micromatch with a mix of overlapping positive and negative globs +✅ works like micromatch with only negative globs +✅ works like micromatch with empty globs +``` +### ✅ packages/jest-util/src/__tests__/installCommonGlobals.test.ts +``` +✅ returns the passed object +✅ turns a V8 global object into a Node global object +``` +### ✅ packages/jest-util/src/__tests__/isInteractive.test.ts +``` +✅ Returns true when running on interactive environment +✅ Returns false when running on a non-interactive environment +``` +### ✅ packages/jest-util/src/__tests__/isPromise.test.ts +``` +not a Promise: + ✅ undefined + ✅ null + ✅ true + ✅ 42 + ✅ "1337" + ✅ Symbol() + ✅ [] + ✅ {} +✅ a resolved Promise +✅ a rejected Promise +``` +### ✅ packages/jest-validate/src/__tests__/validate.test.ts +``` +✅ recursively validates default Jest config +✅ recursively validates default jest-validate config +✅ pretty prints valid config for Boolean +✅ pretty prints valid config for Array +✅ pretty prints valid config for String +✅ pretty prints valid config for Object +✅ pretty prints valid config for Function +✅ omits null and undefined config values +✅ recursively omits null and undefined config values +✅ treat async and non-async functions as equivalent +✅ treat async and non-async functions as equivalent +✅ treat async and non-async functions as equivalent +✅ treat async and non-async functions as equivalent +✅ respects recursiveDenylist +✅ displays warning for unknown config options +✅ displays warning for deprecated config options +✅ works with custom warnings +✅ works with custom errors +✅ works with custom deprecations +✅ works with multiple valid types +✅ reports errors nicely when failing with multiple valid options +✅ Repeated types within multiple valid examples are coalesced in error report +✅ Comments in config JSON using "//" key are not warned +``` +### ✅ packages/jest-validate/src/__tests__/validateCLIOptions.test.js +``` +✅ validates yargs special options +✅ validates testURL +✅ fails for unknown option +✅ fails for multiple unknown options +✅ does not show suggestion when unrecognized cli param length <= 1 +✅ shows suggestion when unrecognized cli param length > 1 +``` +### ✅ packages/jest-watcher/src/lib/__tests__/formatTestNameByPattern.test.ts +``` +for multiline test name returns + ✅ test name with highlighted pattern and replaced line breaks +for one line test name with pattern in the head returns + ✅ test name with highlighted pattern + ✅ test name with cutted tail and highlighted pattern + ✅ test name with cutted tail and cutted highlighted pattern +for one line test name pattern in the middle + ✅ test name with highlighted pattern returns + ✅ test name with cutted tail and highlighted pattern + ✅ test name with cutted tail and cutted highlighted pattern + ✅ test name with highlighted cutted +for one line test name pattern in the tail returns + ✅ test name with highlighted pattern + ✅ test name with cutted tail and cutted highlighted pattern + ✅ test name with highlighted cutted +``` +### ✅ packages/jest-watcher/src/lib/__tests__/prompt.test.ts +``` +✅ calls handler on change value +✅ calls handler on success prompt +✅ calls handler on cancel prompt +``` +### ✅ packages/jest-watcher/src/lib/__tests__/scroll.test.ts +``` +✅ When offset is -1 +✅ When offset is in the first set of items +✅ When offset is in the middle of the list +✅ When offset is at the end of the list +✅ When offset is at the end and size is smaller than max +``` +### ✅ packages/jest-worker/src/__tests__/Farm.test.js +``` +Farm + ✅ sends a request to one worker + ✅ sends four requests to four unique workers + ✅ handles null computeWorkerKey, sending to first worker + ✅ sends the same worker key to the same worker + ✅ returns the result if the call worked + ✅ throws if the call failed + ✅ checks that once a sticked task finishes, next time is sent to that worker + ✅ checks that even before a sticked task finishes, next time is sent to that worker + ✅ checks that locking works, and jobs are never lost + ✅ can receive custom messages from workers +``` +### ✅ packages/jest-worker/src/__tests__/FifoQueue.test.js +``` +✅ returns the shared tasks in FIFO ordering +✅ returns the worker specific tasks in FIFO ordering +✅ maintains global FIFO ordering between worker specific and shared tasks +``` +### ✅ packages/jest-worker/src/__tests__/index.test.js +``` +✅ exposes the right API using default working +✅ exposes the right API using passed worker +✅ breaks if any of the forbidden methods is tried to be exposed +✅ works with minimal options +✅ does not let make calls after the farm is ended +✅ does not let end the farm after it is ended +✅ calls doWork +✅ calls getStderr and getStdout from worker +``` +### ✅ packages/jest-worker/src/__tests__/PriorityQueue.test.js +``` +✅ returns the tasks in order +✅ returns the task with the lowest priority value if inserted in reversed order +✅ returns the task with the lowest priority value if inserted in correct order +✅ uses different queues for each worker +✅ process task in the global and shared queue in order +``` +### ✅ packages/jest-worker/src/__tests__/process-integration.test.js +``` +Jest Worker Integration + ✅ calls a single method from the worker + ✅ distributes sequential calls across child processes + ✅ schedules the task on the first available child processes if the scheduling policy is in-order + ✅ distributes concurrent calls across child processes + ✅ sticks parallel calls to children +``` +### ✅ packages/jest-worker/src/__tests__/thread-integration.test.js +``` +Jest Worker Process Integration + ✅ calls a single method from the worker + ✅ distributes sequential calls across child processes + ✅ schedules the task on the first available child processes if the scheduling policy is in-order + ✅ schedules the task on the first available child processes + ✅ distributes concurrent calls across child processes + ✅ sticks parallel calls to children +``` +### ✅ packages/jest-worker/src/__tests__/WorkerPool.test.js +``` +WorkerPool + ✅ should create a ChildProcessWorker and send to it + ✅ should create a NodeThreadWorker and send to it + ✅ should avoid NodeThreadWorker if not passed enableWorkerThreads +``` +### ✅ packages/jest-worker/src/base/__tests__/BaseWorkerPool.test.js +``` +BaseWorkerPool + ✅ throws error when createWorker is not defined + ✅ creates and exposes n workers + ✅ creates and expoeses n workers + ✅ creates workers with the right options + ✅ makes a non-existing relative worker throw + ✅ create multiple workers with unique worker ids + ✅ aggregates all stdouts and stderrs from all workers + ✅ works when stdout and stderr are not piped to the parent +BaseWorkerPool end + ✅ ends all workers + ✅ resolves with forceExited=false if workers exited gracefully + ✅ force exits workers that do not exit gracefully and resolves with forceExited=true +``` +### ✅ packages/jest-worker/src/workers/__tests__/ChildProcessWorker.test.js +``` +✅ passes fork options down to child_process.fork, adding the defaults +✅ passes workerId to the child process and assign it to 1-indexed env.JEST_WORKER_ID +✅ initializes the child process with the given workerPath +✅ stops initializing the worker after the amount of retries is exceeded +✅ provides stdout and stderr from the child processes +✅ sends the task to the child process +✅ resends the task to the child process after a retry +✅ calls the onProcessStart method synchronously if the queue is empty +✅ can send multiple messages to parent +✅ creates error instances for known errors +✅ throws when the child process returns a strange message +✅ does not restart the child if it cleanly exited +✅ resolves waitForExit() after the child process cleanly exited +✅ restarts the child when the child process dies +✅ sends SIGTERM when forceExit() is called +✅ sends SIGKILL some time after SIGTERM +✅ does not send SIGKILL if SIGTERM exited the process +``` +### ✅ packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js +``` +✅ passes fork options down to child_process.fork, adding the defaults +✅ passes workerId to the thread and assign it to env.JEST_WORKER_ID +✅ initializes the thread with the given workerPath +✅ stops initializing the worker after the amount of retries is exceeded +✅ provides stdout and stderr from the threads +✅ sends the task to the thread +✅ resends the task to the thread after a retry +✅ calls the onProcessStart method synchronously if the queue is empty +✅ can send multiple messages to parent +✅ creates error instances for known errors +✅ throws when the thread returns a strange message +✅ does not restart the thread if it cleanly exited +✅ resolves waitForExit() after the thread cleanly exited +✅ restarts the thread when the thread dies +✅ terminates the thread when forceExit() is called +``` +### ✅ packages/jest-worker/src/workers/__tests__/processChild.test.js +``` +✅ lazily requires the file +✅ calls initialize with the correct arguments +✅ returns results immediately when function is synchronous +✅ returns results when it gets resolved if function is asynchronous +✅ calls the main module if the method call is "default" +✅ calls the main export if the method call is "default" and it is a Babel transpiled one +✅ removes the message listener on END message +✅ calls the teardown method +✅ throws if an invalid message is detected +✅ throws if child is not forked +``` +### ✅ packages/jest-worker/src/workers/__tests__/threadChild.test.js +``` +✅ lazily requires the file +✅ calls initialize with the correct arguments +✅ returns results immediately when function is synchronous +✅ returns results when it gets resolved if function is asynchronous +✅ calls the main module if the method call is "default" +✅ calls the main export if the method call is "default" and it is a Babel transpiled one +✅ removes the message listener on END message +✅ calls the teardown method +✅ throws if an invalid message is detected +✅ throws if child is not forked +``` +### ✅ packages/pretty-format/src/__tests__/AsymmetricMatcher.test.ts +``` +✅ supports any(String) +✅ supports nested any(String) +✅ supports any(Function) +✅ supports nested any(Function) +✅ supports any(Array) +✅ supports nested any(Array) +✅ supports any(Object) +✅ supports nested any(Object) +✅ supports any(RegExp) +✅ supports nested any(RegExp) +✅ supports any(Symbol) +✅ supports nested any(Symbol) +✅ supports any(Function) +✅ supports nested any(Function) +✅ supports any() +✅ supports nested any() +✅ supports any(namedFuntction) +✅ supports nested any(namedFuntction) +✅ anything() +✅ arrayContaining() +✅ arrayNotContaining() +✅ objectContaining() +✅ objectNotContaining() +✅ stringContaining(string) +✅ not.stringContaining(string) +✅ stringMatching(string) +✅ stringMatching(regexp) +✅ stringMatching(regexp) {escapeRegex: false} +✅ stringMatching(regexp) {escapeRegex: true} +✅ stringNotMatching(string) +✅ supports multiple nested asymmetric matchers +✅ min option +indent option + ✅ default implicit: 2 spaces + ✅ default explicit: 2 spaces + ✅ non-default: 0 spaces + ✅ non-default: 4 spaces +maxDepth option + ✅ matchers as leaf nodes + ✅ matchers as internal nodes +``` +### ✅ packages/pretty-format/src/__tests__/ConvertAnsi.test.ts +``` +ConvertAnsi plugin + ✅ supports style.red + ✅ supports style.green + ✅ supports style.reset + ✅ supports style.bold + ✅ supports style.dim + ✅ does not support other colors +``` +### ✅ packages/pretty-format/src/__tests__/DOMCollection.test.ts +``` +DOMCollection plugin for object properties + ✅ supports DOMStringMap + ✅ supports NamedNodeMap + ✅ supports config.min option +DOMCollection plugin for list items + ✅ supports HTMLCollection for getElementsByTagName + ✅ supports HTMLCollection for children + ✅ supports config.maxDepth option + ✅ supports NodeList for querySelectorAll + ✅ supports NodeList for childNodes + ✅ supports HTMLOptionsCollection for select options + ✅ supports HTMLCollection for form elements +``` +### ✅ packages/pretty-format/src/__tests__/DOMElement.test.ts +``` +pretty-format + ✅ prints global window as constructor name alone +DOMElement Plugin + ✅ supports a single HTML element + ✅ supports an HTML element with a class property + ✅ supports an HTML element with a title property + ✅ escapes double quote in attribute value + ✅ supports an HTML element with a single attribute + ✅ supports an HTML element with multiple attributes + ✅ supports an HTML element with attribute and text content + ✅ supports an element with text content + ✅ supports nested elements + ✅ supports nested elements with attributes + ✅ supports nested elements with attribute and text content + ✅ supports nested elements with text content + ✅ supports siblings + ✅ supports multiline text node in pre + ✅ supports multiline text node preceding span in pre + ✅ supports multiline text node in textarea + ✅ supports empty text node + ✅ supports non-empty text node + ✅ supports comment node + ✅ supports fragment node + ✅ supports custom elements + ✅ supports SVG elements + ✅ supports indentation for array of elements + ✅ supports maxDepth option + ✅ handles `tagName` not being a string +DOMElement Plugin matches constructor name of SVG elements + ✅ jsdom 9 and 10 + ✅ jsdom 11 +``` +### ✅ packages/pretty-format/src/__tests__/Immutable.test.ts +``` +✅ does not incorrectly match identity-obj-proxy as Immutable object +Immutable.OrderedSet + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports a single string element + ✅ supports a single integer element + ✅ supports multiple string elements {min: true} + ✅ supports multiple string elements {min: false} + ✅ supports multiple integer elements {min: true} + ✅ supports multiple integer elements {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} +Immutable.List + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports a single string element + ✅ supports a single integer element + ✅ supports multiple string elements {min: true} + ✅ supports multiple string elements {min: false} + ✅ supports multiple integer elements {min: true} + ✅ supports multiple integer elements {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} +Immutable.Stack + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports a single string element + ✅ supports a single integer element + ✅ supports multiple string elements {min: true} + ✅ supports multiple string elements {min: false} + ✅ supports multiple integer elements {min: true} + ✅ supports multiple integer elements {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} +Immutable.Set + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports a single string element + ✅ supports a single integer element + ✅ supports multiple string elements {min: true} + ✅ supports multiple string elements {min: false} + ✅ supports multiple integer elements {min: true} + ✅ supports multiple integer elements {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} +Immutable.Map + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports an object with single key + ✅ supports an object with multiple keys {min: true} + ✅ supports an object with multiple keys {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} +Immutable.OrderedMap + ✅ supports an empty collection {min: true} + ✅ supports an empty collection {min: false} + ✅ supports an object with single key + ✅ supports an object with multiple keys {min: true} + ✅ supports an object with multiple keys {min: false} + ✅ supports object elements {min: true} + ✅ supports object elements {min: false} + ✅ supports React elements {min: true} + ✅ supports React elements {min: false} + ✅ supports non-string keys +Immutable.Record + ✅ supports an empty record {min: true} + ✅ supports an empty record {min: false} + ✅ supports a record with descriptive name + ✅ supports a record without descriptive name + ✅ supports a record with values {min: true} + ✅ supports a record with values {min: false} + ✅ supports a record with Map value {min: true} + ✅ supports a record with Map value {min: false} + ✅ supports imbricated Record {min: true} + ✅ supports imbricated Record {min: false} +indentation of heterogeneous collections + ✅ empty Immutable.List as child of Object + ✅ empty Immutable.Map as child of Array + ✅ non-empty Array as child of Immutable.Map + ✅ non-empty Object as child of Immutable.List +indent option + ✅ default implicit: 2 spaces + ✅ default explicit: 2 spaces + ✅ non-default: 0 spaces + ✅ non-default: 4 spaces +maxDepth option + ✅ Immutable.List as child of Object + ✅ Immutable.Map as child of Array + ✅ Immutable.Seq as child of Immutable.Map + ✅ Immutable.Map as descendants in immutable collection +Immutable.Seq + ✅ supports an empty sequence from array {min: true} + ✅ supports an empty sequence from array {min: false} + ✅ supports a non-empty sequence from array {min: true} + ✅ supports a non-empty sequence from array {min: false} + ✅ supports a non-empty sequence from arguments + ✅ supports an empty sequence from object {min: true} + ✅ supports an empty sequence from object {min: false} + ✅ supports a non-empty sequence from object {min: true} + ✅ supports a non-empty sequence from object {min: false} + ✅ supports a sequence of entries from Immutable.Map + ✅ supports a sequence of values from ECMAScript Set + ✅ supports a sequence of values from Immutable.List + ✅ supports a sequence of values from Immutable.Set + ✅ supports a sequence of values from Immutable.Stack +Immutable.Seq lazy entries + ✅ from object properties + ✅ from Immutable.Map entries +Immutable.Seq lazy values + ✅ from Immutable.Range + ✅ from iterator + ✅ from array items + ✅ from Immutable.List values + ✅ from ECMAScript Set values +``` +### ✅ packages/pretty-format/src/__tests__/prettyFormat.test.ts +``` +prettyFormat() + ✅ prints empty arguments + ✅ prints arguments + ✅ prints an empty array + ✅ prints an array with items + ✅ prints a empty typed array + ✅ prints a typed array with items + ✅ prints an array buffer + ✅ prints a nested array + ✅ prints true + ✅ prints false + ✅ prints an error + ✅ prints a typed error with a message + ✅ prints a function constructor + ✅ prints an anonymous callback function + ✅ prints an anonymous assigned function + ✅ prints a named function + ✅ prints a named generator function + ✅ can customize function names + ✅ prints Infinity + ✅ prints -Infinity + ✅ prints an empty map + ✅ prints a map with values + ✅ prints a map with non-string keys + ✅ prints NaN + ✅ prints null + ✅ prints a positive number + ✅ prints a negative number + ✅ prints zero + ✅ prints negative zero + ✅ prints a positive bigint + ✅ prints a negative bigint + ✅ prints zero bigint + ✅ prints negative zero bigint + ✅ prints a date + ✅ prints an invalid date + ✅ prints an empty object + ✅ prints an object with properties + ✅ prints an object with properties and symbols + ✅ prints an object without non-enumerable properties which have string key + ✅ prints an object without non-enumerable properties which have symbol key + ✅ prints an object with sorted properties + ✅ prints regular expressions from constructors + ✅ prints regular expressions from literals + ✅ prints regular expressions {escapeRegex: false} + ✅ prints regular expressions {escapeRegex: true} + ✅ escapes regular expressions nested inside object + ✅ prints an empty set + ✅ prints a set with values + ✅ prints a string + ✅ prints and escape a string + ✅ doesn't escape string with {excapeString: false} + ✅ prints a string with escapes + ✅ prints a multiline string + ✅ prints a multiline string as value of object property + ✅ prints a symbol + ✅ prints undefined + ✅ prints a WeakMap + ✅ prints a WeakSet + ✅ prints deeply nested objects + ✅ prints circular references + ✅ prints parallel references + ✅ can customize the max depth + ✅ throws on invalid options + ✅ supports plugins + ✅ supports plugins that return empty string + ✅ throws if plugin does not return a string + ✅ throws PrettyFormatPluginError if test throws an error + ✅ throws PrettyFormatPluginError if print throws an error + ✅ throws PrettyFormatPluginError if serialize throws an error + ✅ supports plugins with deeply nested arrays (#24) + ✅ should call plugins on nested basic values + ✅ prints objects with no constructor + ✅ prints identity-obj-proxy with string constructor + ✅ calls toJSON and prints its return value + ✅ calls toJSON and prints an internal representation. + ✅ calls toJSON only on functions + ✅ does not call toJSON recursively + ✅ calls toJSON on Sets + ✅ disables toJSON calls through options +prettyFormat() indent option + ✅ default implicit: 2 spaces + ✅ default explicit: 2 spaces + ✅ non-default: 0 spaces + ✅ non-default: 4 spaces +prettyFormat() min + ✅ prints some basic values in min mode + ✅ prints some complex values in min mode + ✅ does not allow indent !== 0 in min mode +``` +### ✅ packages/pretty-format/src/__tests__/react.test.tsx +``` +✅ supports a single element with no props or children +✅ supports a single element with non-empty string child +✅ supports a single element with empty string child +✅ supports a single element with non-zero number child +✅ supports a single element with zero number child +✅ supports a single element with mixed children +✅ supports props with strings +✅ supports props with multiline strings +✅ supports props with numbers +✅ supports a single element with a function prop +✅ supports a single element with a object prop +✅ supports an element with and object prop and children +✅ supports an element with complex props and mixed children +✅ escapes children properly +✅ supports everything all together +✅ sorts props in nested components +✅ supports a single element with React elements as props +✅ supports a single element with React elements with props +✅ supports a single element with custom React elements with props +✅ supports a single element with custom React elements with props (using displayName) +✅ supports a single element with custom React elements with props (using anonymous function) +✅ supports a single element with custom React elements with a child +✅ supports undefined element type +✅ supports a fragment with no children +✅ supports a fragment with string child +✅ supports a fragment with element child +✅ supports suspense +✅ supports a single element with React elements with a child +✅ supports a single element with React elements with children +✅ supports a single element with React elements with array children +✅ supports array of elements +✅ min option +✅ ReactElement plugin highlights syntax +✅ ReactTestComponent plugin highlights syntax +✅ throws if theme option is null +✅ throws if theme option is not of type "object" +✅ throws if theme option has value that is undefined in ansi-styles +✅ ReactElement plugin highlights syntax with color from theme option +✅ ReactTestComponent plugin highlights syntax with color from theme option +✅ supports forwardRef with a child +✅ supports context Provider with a child +✅ supports context Consumer with a child +✅ ReactElement removes undefined props +✅ ReactTestComponent removes undefined props +test object for subset match + ✅ undefined props + ✅ undefined children +indent option + ✅ default implicit: 2 spaces + ✅ default explicit: 2 spaces + ✅ non-default: 0 spaces + ✅ non-default: 4 spaces +maxDepth option + ✅ elements + ✅ array of elements +React.memo without displayName + ✅ renders the component name +React.memo with displayName + ✅ renders the displayName of component before memoizing + ✅ renders the displayName of memoized component +``` +### ✅ packages/pretty-format/src/__tests__/ReactElement.test.ts +``` +ReactElement Plugin + ✅ serializes forwardRef without displayName + ✅ serializes forwardRef with displayName + ✅ serializes forwardRef component with displayName ``` \ No newline at end of file diff --git a/__tests__/__outputs__/junit-with-message.md b/__tests__/__outputs__/junit-with-message.md new file mode 100644 index 0000000..634a402 --- /dev/null +++ b/__tests__/__outputs__/junit-with-message.md @@ -0,0 +1,15 @@ +![Tests failed](https://img.shields.io/badge/tests-1%20failed-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/junit-with-message.xml](#user-content-r0)||1 ❌||1ms| +## ❌ fixtures/junit-with-message.xml +**1** tests were completed in **1ms** with **0** passed, **1** failed and **0** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[Test](#user-content-r0s0)||1 ❌||1ms| +### ❌ Test +``` +Fails + ❌ Test + error.cpp:01 +``` \ No newline at end of file diff --git a/__tests__/__outputs__/mocha-json.md b/__tests__/__outputs__/mocha-json.md index 9eadcae..875f881 100644 --- a/__tests__/__outputs__/mocha-json.md +++ b/__tests__/__outputs__/mocha-json.md @@ -1,14 +1,17 @@ ![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%204%20failed%2C%201%20skipped-critical) -## ❌ fixtures/mocha-json.json +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/mocha-json.json](#user-content-r0)|1 ✅|4 ❌|1 ⚪|12ms| +## ❌ fixtures/mocha-json.json **6** tests were completed in **12ms** with **1** passed, **4** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[test/main.test.js](#r0s0)|1✔️|3❌||1ms| -|[test/second.test.js](#r0s1)||1❌|1✖️|8ms| -### ❌ test/main.test.js +|[test/main.test.js](#user-content-r0s0)|1 ✅|3 ❌||1ms| +|[test/second.test.js](#user-content-r0s1)||1 ❌|1 ⚪|8ms| +### ❌ test/main.test.js ``` Test 1 - ✔️ Passing test + ✅ Passing test Test 1 Test 1.1 ❌ Exception in target unit Some error @@ -21,9 +24,9 @@ Test 2 ❌ Exception in test Some error ``` -### ❌ test/second.test.js +### ❌ test/second.test.js ``` -✖️ Skipped test +⚪ Skipped test ❌ Timeout test Timeout of 1ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\Users\Michal\Workspace\dorny\test-reporter\reports\mocha\test\second.test.js) ``` \ No newline at end of file diff --git a/__tests__/__outputs__/mocha-test-results.md b/__tests__/__outputs__/mocha-test-results.md index fd85859..4a6e2f6 100644 --- a/__tests__/__outputs__/mocha-test-results.md +++ b/__tests__/__outputs__/mocha-test-results.md @@ -1,41 +1,1437 @@ ![Tests passed successfully](https://img.shields.io/badge/tests-833%20passed%2C%206%20skipped-success) -## ✔️ fixtures/external/mocha/mocha-test-results.json +
Expand for details + +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/mocha/mocha-test-results.json](#user-content-r0)|833 ✅||6 ⚪|6s| +## ✅ fixtures/external/mocha/mocha-test-results.json **839** tests were completed in **6s** with **833** passed, **0** failed and **6** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|test/node-unit/buffered-worker-pool.spec.js|14✔️|||8ms| -|test/node-unit/cli/config.spec.js|10✔️|||8ms| -|test/node-unit/cli/node-flags.spec.js|105✔️|||9ms| -|test/node-unit/cli/options.spec.js|36✔️|||250ms| -|test/node-unit/cli/run-helpers.spec.js|9✔️|||8ms| -|test/node-unit/cli/run.spec.js|40✔️|||4ms| -|test/node-unit/mocha.spec.js|24✔️|||33ms| -|test/node-unit/parallel-buffered-runner.spec.js|19✔️|||23ms| -|test/node-unit/reporters/parallel-buffered.spec.js|6✔️|||16ms| -|test/node-unit/serializer.spec.js|40✔️|||31ms| -|test/node-unit/stack-trace-filter.spec.js|2✔️||4✖️|1ms| -|test/node-unit/utils.spec.js|5✔️|||1ms| -|test/node-unit/worker.spec.js|15✔️|||92ms| -|test/unit/context.spec.js|8✔️|||5ms| -|test/unit/duration.spec.js|3✔️|||166ms| -|test/unit/errors.spec.js|13✔️|||5ms| -|test/unit/globals.spec.js|4✔️|||0ms| -|test/unit/grep.spec.js|8✔️|||2ms| -|test/unit/hook-async.spec.js|3✔️|||1ms| -|test/unit/hook-sync-nested.spec.js|4✔️|||1ms| -|test/unit/hook-sync.spec.js|3✔️|||0ms| -|test/unit/hook-timeout.spec.js|1✔️|||0ms| -|test/unit/hook.spec.js|4✔️|||0ms| -|test/unit/mocha.spec.js|115✔️||1✖️|128ms| -|test/unit/overspecified-async.spec.js|1✔️|||3ms| -|test/unit/parse-query.spec.js|2✔️|||1ms| -|test/unit/plugin-loader.spec.js|41✔️||1✖️|16ms| -|test/unit/required-tokens.spec.js|1✔️|||0ms| -|test/unit/root.spec.js|1✔️|||0ms| -|test/unit/runnable.spec.js|55✔️|||122ms| -|test/unit/runner.spec.js|77✔️|||43ms| -|test/unit/suite.spec.js|57✔️|||14ms| -|test/unit/test.spec.js|15✔️|||0ms| -|test/unit/throw.spec.js|9✔️|||9ms| -|test/unit/timeout.spec.js|8✔️|||109ms| -|test/unit/utils.spec.js|75✔️|||24ms| \ No newline at end of file +|[test/node-unit/buffered-worker-pool.spec.js](#user-content-r0s0)|14 ✅|||8ms| +|[test/node-unit/cli/config.spec.js](#user-content-r0s1)|10 ✅|||8ms| +|[test/node-unit/cli/node-flags.spec.js](#user-content-r0s2)|105 ✅|||9ms| +|[test/node-unit/cli/options.spec.js](#user-content-r0s3)|36 ✅|||250ms| +|[test/node-unit/cli/run-helpers.spec.js](#user-content-r0s4)|9 ✅|||8ms| +|[test/node-unit/cli/run.spec.js](#user-content-r0s5)|40 ✅|||4ms| +|[test/node-unit/mocha.spec.js](#user-content-r0s6)|24 ✅|||33ms| +|[test/node-unit/parallel-buffered-runner.spec.js](#user-content-r0s7)|19 ✅|||23ms| +|[test/node-unit/reporters/parallel-buffered.spec.js](#user-content-r0s8)|6 ✅|||16ms| +|[test/node-unit/serializer.spec.js](#user-content-r0s9)|40 ✅|||31ms| +|[test/node-unit/stack-trace-filter.spec.js](#user-content-r0s10)|2 ✅||4 ⚪|1ms| +|[test/node-unit/utils.spec.js](#user-content-r0s11)|5 ✅|||1ms| +|[test/node-unit/worker.spec.js](#user-content-r0s12)|15 ✅|||92ms| +|[test/unit/context.spec.js](#user-content-r0s13)|8 ✅|||5ms| +|[test/unit/duration.spec.js](#user-content-r0s14)|3 ✅|||166ms| +|[test/unit/errors.spec.js](#user-content-r0s15)|13 ✅|||5ms| +|[test/unit/globals.spec.js](#user-content-r0s16)|4 ✅|||0ms| +|[test/unit/grep.spec.js](#user-content-r0s17)|8 ✅|||2ms| +|[test/unit/hook-async.spec.js](#user-content-r0s18)|3 ✅|||1ms| +|[test/unit/hook-sync-nested.spec.js](#user-content-r0s19)|4 ✅|||1ms| +|[test/unit/hook-sync.spec.js](#user-content-r0s20)|3 ✅|||0ms| +|[test/unit/hook-timeout.spec.js](#user-content-r0s21)|1 ✅|||0ms| +|[test/unit/hook.spec.js](#user-content-r0s22)|4 ✅|||0ms| +|[test/unit/mocha.spec.js](#user-content-r0s23)|115 ✅||1 ⚪|128ms| +|[test/unit/overspecified-async.spec.js](#user-content-r0s24)|1 ✅|||3ms| +|[test/unit/parse-query.spec.js](#user-content-r0s25)|2 ✅|||1ms| +|[test/unit/plugin-loader.spec.js](#user-content-r0s26)|41 ✅||1 ⚪|16ms| +|[test/unit/required-tokens.spec.js](#user-content-r0s27)|1 ✅|||0ms| +|[test/unit/root.spec.js](#user-content-r0s28)|1 ✅|||0ms| +|[test/unit/runnable.spec.js](#user-content-r0s29)|55 ✅|||122ms| +|[test/unit/runner.spec.js](#user-content-r0s30)|77 ✅|||43ms| +|[test/unit/suite.spec.js](#user-content-r0s31)|57 ✅|||14ms| +|[test/unit/test.spec.js](#user-content-r0s32)|15 ✅|||0ms| +|[test/unit/throw.spec.js](#user-content-r0s33)|9 ✅|||9ms| +|[test/unit/timeout.spec.js](#user-content-r0s34)|8 ✅|||109ms| +|[test/unit/utils.spec.js](#user-content-r0s35)|75 ✅|||24ms| +### ✅ test/node-unit/buffered-worker-pool.spec.js +``` +class BufferedWorkerPool constructor + ✅ should apply defaults +class BufferedWorkerPool instance method run() + ✅ should deserialize the result + ✅ should serialize the options object +class BufferedWorkerPool instance method run() when passed a non-string filepath + ✅ should reject +class BufferedWorkerPool instance method run() when passed no arguments + ✅ should reject +class BufferedWorkerPool instance method stats() + ✅ should return the object returned by `workerpool.Pool#stats` +class BufferedWorkerPool instance method terminate() when called with `force` + ✅ should delegate to the underlying pool w/ "force" behavior +class BufferedWorkerPool instance method terminate() when called without `force` + ✅ should delegate to the underlying pool w/o "force" behavior +class BufferedWorkerPool static method create() + ✅ should return a BufferedWorkerPool instance +class BufferedWorkerPool static method create() when passed no arguments + ✅ should not throw +class BufferedWorkerPool static method serializeOptions() + ✅ should return a serialized string +class BufferedWorkerPool static method serializeOptions() when called multiple times with the same object + ✅ should not perform serialization twice + ✅ should return the same value +class BufferedWorkerPool static method serializeOptions() when passed no arguments + ✅ should not throw +``` +### ✅ test/node-unit/cli/config.spec.js +``` +cli/config findConfig() + ✅ should look for one of the config files using findup-sync + ✅ should support an explicit `cwd` +cli/config loadConfig() when config file parsing fails + ✅ should throw +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".cjs" extension + ✅ should use the JS parser +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".js" extension + ✅ should use the JS parser +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".json" extension + ✅ should use the JSON parser +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".jsonc" extension + ✅ should use the JSON parser +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".yaml" extension + ✅ should use the YAML parser +cli/config loadConfig() when parsing succeeds when supplied a filepath with ".yml" extension + ✅ should use the YAML parser +cli/config loadConfig() when supplied a filepath with unsupported extension + ✅ should use the JSON parser +``` +### ✅ test/node-unit/cli/node-flags.spec.js +``` +node-flags impliesNoTimeouts() + ✅ should return true for inspect flags +node-flags isNodeFlag() for all allowed node env flags which conflict with mocha flags + ✅ --require should return false + ✅ -r should return false +node-flags isNodeFlag() for all allowed node environment flags + ✅ --abort-on-uncaught-exception should return true + ✅ --conditions should return true + ✅ --debug-arraybuffer-allocations should return true + ✅ --debug-port should return true + ✅ --diagnostic-dir should return true + ✅ --disable-proto should return true + ✅ --disallow-code-generation-from-strings should return true + ✅ --enable-source-maps should return true + ✅ --es-module-specifier-resolution should return true + ✅ --experimental-import-meta-resolve should return true + ✅ --experimental-json-modules should return true + ✅ --experimental-loader should return true + ✅ --experimental-modules should return true + ✅ --experimental-policy should return true + ✅ --experimental-repl-await should return true + ✅ --experimental-report should return true + ✅ --experimental-specifier-resolution should return true + ✅ --experimental-vm-modules should return true + ✅ --experimental-wasi-unstable-preview1 should return true + ✅ --experimental-wasm-modules should return true + ✅ --experimental-worker should return true + ✅ --force-context-aware should return true + ✅ --frozen-intrinsics should return true + ✅ --heapsnapshot-signal should return true + ✅ --http-parser should return true + ✅ --http-server-default-timeout should return true + ✅ --huge-max-old-generation-size should return true + ✅ --icu-data-dir should return true + ✅ --input-type should return true + ✅ --insecure-http-parser should return true + ✅ --inspect should return true + ✅ --inspect-brk should return true + ✅ --inspect-port should return true + ✅ --inspect-publish-uid should return true + ✅ --interpreted-frames-native-stack should return true + ✅ --jitless should return true + ✅ --loader should return true + ✅ --max-http-header-size should return true + ✅ --max-old-space-size should return true + ✅ --napi-modules should return true + ✅ --no-deprecation should return true + ✅ --no-force-async-hooks-checks should return true + ✅ --no-node-snapshot should return true + ✅ --no-warnings should return true + ✅ --openssl-config should return true + ✅ --pending-deprecation should return true + ✅ --perf-basic-prof should return true + ✅ --perf-basic-prof-only-functions should return true + ✅ --perf-prof should return true + ✅ --perf-prof-unwinding-info should return true + ✅ --policy-integrity should return true + ✅ --preserve-symlinks should return true + ✅ --preserve-symlinks-main should return true + ✅ --prof-process should return true + ✅ --redirect-warnings should return true + ✅ --report-compact should return true + ✅ --report-dir should return true + ✅ --report-directory should return true + ✅ --report-filename should return true + ✅ --report-on-fatalerror should return true + ✅ --report-on-signal should return true + ✅ --report-signal should return true + ✅ --report-uncaught-exception should return true + ✅ --stack-trace-limit should return true + ✅ --throw-deprecation should return true + ✅ --title should return true + ✅ --tls-cipher-list should return true + ✅ --tls-keylog should return true + ✅ --tls-max-v1.2 should return true + ✅ --tls-max-v1.3 should return true + ✅ --tls-min-v1.0 should return true + ✅ --tls-min-v1.1 should return true + ✅ --tls-min-v1.2 should return true + ✅ --tls-min-v1.3 should return true + ✅ --trace-deprecation should return true + ✅ --trace-event-categories should return true + ✅ --trace-event-file-pattern should return true + ✅ --trace-events-enabled should return true + ✅ --trace-exit should return true + ✅ --trace-sigint should return true + ✅ --trace-sync-io should return true + ✅ --trace-tls should return true + ✅ --trace-uncaught should return true + ✅ --trace-warnings should return true + ✅ --track-heap-objects should return true + ✅ --unhandled-rejections should return true + ✅ --use-bundled-ca should return true + ✅ --use-largepages should return true + ✅ --use-openssl-ca should return true + ✅ --v8-pool-size should return true + ✅ --zero-fill-buffers should return true +node-flags isNodeFlag() special cases + ✅ should return true for "es-staging" + ✅ should return true for "gc-global" + ✅ should return true for "harmony" itself + ✅ should return true for "use-strict" + ✅ should return true for flags starting with "--v8-" + ✅ should return true for flags starting with "harmony-" or "harmony_" + ✅ should return true for flags starting with "preserve-symlinks" + ✅ should return true for flags starting with "trace-" or "trace_" +node-flags isNodeFlag() when expecting leading dashes + ✅ should require leading dashes +node-flags unparseNodeFlags() + ✅ should handle multiple v8 flags + ✅ should handle single v8 flags +``` +### ✅ test/node-unit/cli/options.spec.js +``` +options loadOptions() "extension" handling when user does not supply "extension" option + ✅ should retain the default +options loadOptions() "extension" handling when user supplies "extension" option + ✅ should not concatenate the default value +options loadOptions() "ignore" handling + ✅ should not split option values by comma +options loadOptions() "spec" handling when user supplies "spec" in config and positional arguments + ✅ should place both - unsplitted - into the positional arguments array +options loadOptions() config priority + ✅ should prioritize args over rc file + ✅ should prioritize package.json over defaults + ✅ should prioritize rc file over package.json +options loadOptions() when called with a one-and-done arg "h" + ✅ should return basic parsed arguments and flag +options loadOptions() when called with a one-and-done arg "help" + ✅ should return basic parsed arguments and flag +options loadOptions() when called with a one-and-done arg "list-interfaces" + ✅ should return basic parsed arguments and flag +options loadOptions() when called with a one-and-done arg "list-reporters" + ✅ should return basic parsed arguments and flag +options loadOptions() when called with a one-and-done arg "V" + ✅ should return basic parsed arguments and flag +options loadOptions() when called with a one-and-done arg "version" + ✅ should return basic parsed arguments and flag +options loadOptions() when no parameter provided + ✅ should return an object containing positional args, defaults, and anti-reloading flags +options loadOptions() when parameter provided package.json when called with package = false (`--no-package`) + ✅ should not look for package.json + ✅ should return parsed args and default config + ✅ should set package = false +options loadOptions() when parameter provided package.json when path to package.json (`--package `) is invalid + ✅ should throw +options loadOptions() when parameter provided package.json when path to package.json (`--package `) is valid + ✅ should not try to find a package.json + ✅ should return merged options incl. package.json opts + ✅ should set package = false +options loadOptions() when parameter provided package.json when path to package.json unspecified + ✅ should return merged options incl. found package.json + ✅ should set package = false +options loadOptions() when parameter provided rc file when called with config = false (`--no-config`) + ✅ should not attempt to find a config file + ✅ should not attempt to load a config file + ✅ should return parsed args, default config and package.json + ✅ should set config = false +options loadOptions() when parameter provided rc file when called with unspecified config when an rc file would be found + ✅ should attempt to load file at found path + ✅ should look for a config + ✅ should set config = false +options loadOptions() when parameter provided rc file when called with unspecified config when an rc file would not be found + ✅ should look for a config + ✅ should not attempt to load a config file + ✅ should set config = false +options loadOptions() when parameter provided rc file when path to config (`--config `) is invalid + ✅ should attempt to load file at path + ✅ should not look for a config + ✅ should throw to warn the user +``` +### ✅ test/node-unit/cli/run-helpers.spec.js +``` +helpers list() when given a comma-delimited string + ✅ should return a flat array +helpers list() when provided a flat array + ✅ should return a flat array +helpers list() when provided a nested array + ✅ should return a flat array +helpers validateLegacyPlugin() when a plugin throws an exception upon load + ✅ should fail and report the original error +helpers validateLegacyPlugin() when used with "reporter" key + ✅ should disallow an array of names + ✅ should fail to recognize an unknown reporter +helpers validateLegacyPlugin() when used with an "interfaces" key + ✅ should disallow an array of names + ✅ should fail to recognize an unknown interface +helpers validateLegacyPlugin() when used with an unknown plugin type + ✅ should fail +``` +### ✅ test/node-unit/cli/run.spec.js +``` +command run builder array type + ✅ should include option extension + ✅ should include option file + ✅ should include option global + ✅ should include option ignore + ✅ should include option reporter-option + ✅ should include option require + ✅ should include option spec + ✅ should include option watch-files + ✅ should include option watch-ignore +command run builder boolean type + ✅ should include option allow-uncaught + ✅ should include option async-only + ✅ should include option bail + ✅ should include option check-leaks + ✅ should include option color + ✅ should include option delay + ✅ should include option diff + ✅ should include option exit + ✅ should include option forbid-only + ✅ should include option forbid-pending + ✅ should include option full-trace + ✅ should include option growl + ✅ should include option inline-diffs + ✅ should include option invert + ✅ should include option list-interfaces + ✅ should include option list-reporters + ✅ should include option no-colors + ✅ should include option parallel + ✅ should include option recursive + ✅ should include option sort + ✅ should include option watch +command run builder number type + ✅ should include option jobs + ✅ should include option retries +command run builder string type + ✅ should include option config + ✅ should include option fgrep + ✅ should include option grep + ✅ should include option package + ✅ should include option reporter + ✅ should include option slow + ✅ should include option timeout + ✅ should include option ui +``` +### ✅ test/node-unit/mocha.spec.js +``` +Mocha instance method addFile() + ✅ should add the given file to the files array + ✅ should be chainable +Mocha instance method lazyLoadFiles() + ✅ should return the `Mocha` instance +Mocha instance method lazyLoadFiles() when passed `true` + ✅ should enable lazy loading +Mocha instance method lazyLoadFiles() when passed a non-`true` value + ✅ should enable eager loading +Mocha instance method loadFiles() + ✅ should execute the optional callback if given + ✅ should load all files from the files array +Mocha instance method parallelMode() when `Mocha` is running in Node.js + ✅ should return the Mocha instance +Mocha instance method parallelMode() when `Mocha` is running in Node.js when `Mocha` instance in serial mode when passed `true` value when `Mocha` instance is in `INIT` state + ✅ should enable parallel mode +Mocha instance method parallelMode() when `Mocha` is running in Node.js when `Mocha` instance in serial mode when passed `true` value when `Mocha` instance is not in `INIT` state + ✅ should throw +Mocha instance method parallelMode() when `Mocha` is running in Node.js when `Mocha` instance in serial mode when passed non-`true` value when `Mocha` instance is in `INIT` state + ✅ should enable serial mode +Mocha instance method parallelMode() when `Mocha` is running in Node.js when parallel mode is already disabled + ✅ should not swap the Runner, nor change lazy loading setting +Mocha instance method parallelMode() when `Mocha` is running in Node.js when parallel mode is already enabled + ✅ should not swap the Runner, nor change lazy loading setting +Mocha instance method reporter() when a reporter exists relative to the "mocha" module path + ✅ should load from module path +Mocha instance method reporter() when a reporter exists relative to the "mocha" module path when the reporter throws upon load + ✅ should throw "invalid reporter" exception + ✅ should warn about the error before throwing +Mocha instance method reporter() when a reporter exists relative to the cwd + ✅ should load from current working directory +Mocha instance method reporter() when a reporter exists relative to the cwd when the reporter throws upon load + ✅ should throw "invalid reporter" exception + ✅ should warn about the error before throwing +Mocha instance method unloadFiles() + ✅ should be chainable + ✅ should delegate Mocha.unloadFile() for each item in its list of files + ✅ should not be allowed when the current instance is already disposed + ✅ should reset referencesCleaned and allow for next run +Mocha static method unloadFile() + ✅ should unload a specific file from cache +``` +### ✅ test/node-unit/parallel-buffered-runner.spec.js +``` +parallel-buffered-runner ParallelBufferedRunner constructor + ✅ should start in "IDLE" state +parallel-buffered-runner ParallelBufferedRunner event EVENT_RUN_END + ✅ should change the state to COMPLETE +parallel-buffered-runner ParallelBufferedRunner instance method isParallelMode() + ✅ should return true +parallel-buffered-runner ParallelBufferedRunner instance method linkPartialObjects() + ✅ should return the runner +parallel-buffered-runner ParallelBufferedRunner instance method run() + ✅ should be chainable + ✅ should emit `EVENT_RUN_BEGIN` +parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when an event contains an error and has positive failures when subsequent files already started running + ✅ should cleanly terminate the thread pool +parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when an event contains an error and has positive failures when subsequent files have not yet been run + ✅ should cleanly terminate the thread pool + ✅ should cleanly terminate the thread pool +parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when no event contains an error + ✅ should not force-terminate +parallel-buffered-runner ParallelBufferedRunner instance method run() when a worker fails + ✅ should delegate to Runner#uncaught + ✅ should recover +parallel-buffered-runner ParallelBufferedRunner instance method run() when instructed to link objects + ✅ should create object references +parallel-buffered-runner ParallelBufferedRunner instance method run() when instructed to link objects when event data object is missing an ID + ✅ should result in an uncaught exception +parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when an event contains an error and has positive failures when subsequent files already started running + ✅ should cleanly terminate the thread pool +parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when an event contains an error and has positive failures when subsequent files have not yet been run + ✅ should cleanly terminate the thread pool +parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when no event contains an error + ✅ should not force-terminate +parallel-buffered-runner ParallelBufferedRunner instance method workerReporter() + ✅ should return its context +parallel-buffered-runner ParallelBufferedRunner instance property _state + ✅ should disallow an invalid state transition +``` +### ✅ test/node-unit/reporters/parallel-buffered.spec.js +``` +ParallelBuffered constructor + ✅ should listen for Runner events + ✅ should listen for Runner events expecting to occur once +ParallelBuffered event on any other event listened for + ✅ should populate its `events` array with SerializableEvents +ParallelBuffered event on EVENT_RUN_END + ✅ should remove all listeners +ParallelBuffered instance method done + ✅ should execute its callback with a SerializableWorkerResult + ✅ should reset its `events` prop +``` +### ✅ test/node-unit/serializer.spec.js +``` +serializer function deserialize when passed a non-object value + ✅ should return the value +serializer function deserialize when passed a SerializedWorkerResult object + ✅ should return the result of `SerializableWorkerResult.deserialize` called on the value +serializer function deserialize when passed an object value which is not a SerializedWorkerResult + ✅ should return the value +serializer function deserialize when passed nothing + ✅ should return `undefined` +serializer function serialize when not passed anything + ✅ should return `undefined` +serializer function serialize when passed a non-object value + ✅ should return the value +serializer function serialize when passed an object value having a `serialize` method + ✅ should return the result of the `serialize` method +serializer function serialize when passed an object value w/o a `serialize` method + ✅ should return the value +serializer SerializableEvent constructor when called with a non-object `rawObject` + ✅ should throw "invalid arg type" error +serializer SerializableEvent constructor when called without `eventName` + ✅ should throw "invalid arg value" error +serializer SerializableEvent instance method serialize + ✅ should freeze the instance + ✅ should mutate the instance in-place +serializer SerializableEvent instance method serialize when passed an error + ✅ should not retain not-own props + ✅ should retain own props + ✅ should serialize the error +serializer SerializableEvent instance method serialize when passed an object containing a nested prop with an Error value + ✅ should serialize the Error +serializer SerializableEvent instance method serialize when passed an object containing a non-`serialize` method + ✅ should remove the method +serializer SerializableEvent instance method serialize when passed an object containing a top-level prop with an Error value + ✅ should serialize the Error +serializer SerializableEvent instance method serialize when passed an object containing an array + ✅ should serialize the array +serializer SerializableEvent instance method serialize when passed an object containing an object with a `serialize` method + ✅ should call the `serialize` method +serializer SerializableEvent instance method serialize when passed an object with a `serialize` method + ✅ should call the `serialize` method +serializer SerializableEvent static method create + ✅ should instantiate a SerializableEvent +serializer SerializableEvent static method deserialize + ✅ should return a new object w/ null prototype +serializer SerializableEvent static method deserialize when passed a falsy parameter + ✅ should throw "invalid arg type" error +serializer SerializableEvent static method deserialize when passed value contains `data` prop + ✅ should ignore __proto__ +serializer SerializableEvent static method deserialize when passed value contains `data` prop when `data` prop contains a nested serialized Error prop + ✅ should create an Error instance from the nested serialized Error prop +serializer SerializableEvent static method deserialize when passed value contains an `error` prop + ✅ should create an Error instance from the prop +serializer SerializableEvent static method deserialize when passed value data contains a prop beginning with "$$" + ✅ should create a new prop having a function value + ✅ should create a new prop returning the original value + ✅ should remove the prop with the "$$" prefix +serializer SerializableEvent static method deserialize when the value data contains a prop with an array value + ✅ should deserialize each prop +serializer SerializableWorkerResult constructor + ✅ should add a readonly `__type` prop +serializer SerializableWorkerResult instance method serialize + ✅ should call `SerializableEvent#serialize` of each of its events + ✅ should return a read-only value +serializer SerializableWorkerResult static method create + ✅ should return a new SerializableWorkerResult instance +serializer SerializableWorkerResult static method deserialize + ✅ should call SerializableEvent#deserialize on each item in its `events` prop + ✅ should return the deserialized value +serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an instance + ✅ should return `true` +serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an object with an appropriate `__type` prop + ✅ should return `true` +serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an object without an appropriate `__type` prop + ✅ should return `false` +``` +### ✅ test/node-unit/stack-trace-filter.spec.js +``` +stackTraceFilter() on browser + ✅ does not strip out other bower_components +stackTraceFilter() on node on POSIX OS + ⚪ does not ignore other bower_components and components + ⚪ should get a stack-trace as a string and prettify it + ⚪ should not replace absolute path which has cwd as infix + ⚪ should replace absolute with relative paths +stackTraceFilter() on node on Windows + ✅ should work on Windows +``` +### ✅ test/node-unit/utils.spec.js +``` +utils function canonicalType() + ✅ should return "asyncfunction" if the parameter is an async function + ✅ should return "buffer" if the parameter is a Buffer +utils function cwd() + ✅ should return the current working directory +utils function type() + ✅ should return "error" if the parameter is an Error + ✅ should return "function" if the parameter is an async function +``` +### ✅ test/node-unit/worker.spec.js +``` +worker when run as main process + ✅ should throw +worker when run as worker process + ✅ should register itself with workerpool +worker when run as worker process function run() when called with empty "filepath" argument + ✅ should reject +worker when run as worker process function run() when called without arguments + ✅ should reject +worker when run as worker process function run() when passed a non-string `options` value + ✅ should reject +worker when run as worker process function run() when passed an invalid string `options` value + ✅ should reject +worker when run as worker process function run() when the file at "filepath" argument is unloadable + ✅ should reject +worker when run as worker process function run() when the file at "filepath" is loadable + ✅ should call Mocha#run + ✅ should handle "--require" + ✅ should handle "--ui" + ✅ should remove all uncaughtException listeners + ✅ should remove all unhandledRejection listeners +worker when run as worker process function run() when the file at "filepath" is loadable when run twice + ✅ should initialize only once +worker when run as worker process function run() when the file at "filepath" is loadable when serialization fails + ✅ should reject +worker when run as worker process function run() when the file at "filepath" is loadable when serialization succeeds + ✅ should resolve with a SerializedWorkerResult +``` +### ✅ test/unit/context.spec.js +``` +Context nested + ✅ should work +Context Siblings sequestered sibling + ✅ should work +Context Siblings sibling verifiction + ✅ should allow test siblings to modify shared context + ✅ should have reset this.calls before describe + ✅ should not have value set within a sibling describe +methods retries + ✅ should return the number of retries +methods slow() + ✅ should return the slow +methods timeout() + ✅ should return the timeout +``` +### ✅ test/unit/duration.spec.js +``` +durations when fast + ✅ should not highlight +durations when reasonable + ✅ should highlight in yellow +durations when slow + ✅ should highlight in red +``` +### ✅ test/unit/errors.spec.js +``` +Errors createForbiddenExclusivityError() when Mocha instance is not running in a worker process + ✅ should output a message regarding --forbid-only +Errors createForbiddenExclusivityError() when Mocha instance is running in a worker process + ✅ should output a message regarding incompatibility +Errors createInvalidInterfaceError() + ✅ should include expected code in thrown interface errors +Errors createInvalidReporterError() + ✅ should include expected code in thrown reporter errors +Errors deprecate() + ✅ should cache the message + ✅ should coerce its parameter to a string + ✅ should ignore falsy messages +Errors isMochaError() when provided a non-error + ✅ should return false +Errors isMochaError() when provided an Error object having a known Mocha error code + ✅ should return true +Errors isMochaError() when provided an Error object with a non-Mocha error code + ✅ should return false +Errors warn() + ✅ should call process.emitWarning + ✅ should ignore falsy messages + ✅ should not cache messages +``` +### ✅ test/unit/globals.spec.js +``` +global leaks + ✅ should cause tests to fail + ✅ should pass when accepted + ✅ should pass when prefixed "mocha-" + ✅ should pass with wildcard +``` +### ✅ test/unit/grep.spec.js +``` +Mocha .grep() + ✅ should add a RegExp to the mocha.options object + ✅ should convert grep string to a RegExp + ✅ should covert grep regex-like string to a RegExp + ✅ should return its parent Mocha object for chainability +Mocha "fgrep" option + ✅ should escape and convert string to a RegExp +Mocha "grep" option + ✅ should add a RegExp to the mocha.options object + ✅ should convert string to a RegExp +Mocha "invert" option + ✅ should add a Boolean to the mocha.options object +``` +### ✅ test/unit/hook-async.spec.js +``` +async hooks + ✅ one + ✅ three + ✅ two +``` +### ✅ test/unit/hook-sync-nested.spec.js +``` +serial nested + ✅ bar + ✅ foo +serial nested hooks + ✅ one + ✅ two +``` +### ✅ test/unit/hook-sync.spec.js +``` +serial hooks + ✅ one + ✅ three + ✅ two +``` +### ✅ test/unit/hook-timeout.spec.js +``` +hook timeout + ✅ should work +``` +### ✅ test/unit/hook.spec.js +``` +Hook error + ✅ should get the hook._error when called without arguments + ✅ should set the hook._error +Hook reset + ✅ should call Runnable.reset + ✅ should reset the error state +``` +### ✅ test/unit/mocha.spec.js +``` +Mocha constructor + ✅ should set _cleanReferencesAfterRun to true +Mocha constructor when `global` option is an `Array` + ✅ should attempt to set globals +Mocha constructor when `parallel` option is true and `jobs` option <= 1 + ✅ should not enable parallel mode +Mocha constructor when `parallel` option is true and `jobs` option > 1 + ✅ should enable parallel mode +Mocha constructor when `parallel` option is true when `enableGlobalSetup` option is present + ✅ should toggle global setup fixtures +Mocha constructor when `parallel` option is true when `enableGlobalTeardown` option is present + ✅ should configure global teardown fixtures +Mocha constructor when `parallel` option is true when `globalSetup` option is present + ✅ should configure global setup fixtures +Mocha constructor when `parallel` option is true when `globalTeardown` option is present + ✅ should configure global teardown fixtures +Mocha constructor when `retries` option is not present + ✅ should not attempt to set retries +Mocha constructor when `retries` option is present + ✅ should attempt to set retries` +Mocha constructor when `rootHooks` option is truthy + ✅ shouid attempt to set root hooks +Mocha constructor when `timeout` option is `false` + ✅ should attempt to set timeout +Mocha constructor when `timeout` option is `undefined` + ✅ should not attempt to set timeout +Mocha instance method _runGlobalFixtures() + ✅ should execute multiple fixtures in order +Mocha instance method allowUncaught() + ✅ should be chainable + ✅ should set the allowUncaught option to false + ✅ should set the allowUncaught option to true +Mocha instance method asyncOnly() + ✅ should be chainable + ✅ should set the asyncOnly option to false + ✅ should set the asyncOnly option to true +Mocha instance method bail() + ✅ should be chainable +Mocha instance method bail() when provided a falsy argument + ✅ should unset the "bail" flag on the root suite +Mocha instance method bail() when provided no arguments + ✅ should set the "bail" flag on the root suite +Mocha instance method checkLeaks() + ✅ should set the checkLeaks option to true +Mocha instance method cleanReferencesAfterRun() + ✅ should be chainable + ✅ should set the _cleanReferencesAfterRun attribute + ✅ should set the _cleanReferencesAfterRun attribute to false +Mocha instance method color() + ✅ should be chainable + ✅ should set the color option to false + ✅ should set the color option to true +Mocha instance method delay() + ✅ should be chainable + ✅ should set the delay option to true +Mocha instance method diff() + ✅ should set the diff option to true +Mocha instance method diff() when provided `false` argument + ✅ should set the diff option to false +Mocha instance method dispose() + ✅ should dispose previous test runner + ✅ should dispose the root suite + ✅ should unload the files +Mocha instance method forbidOnly() + ✅ should be chainable + ✅ should set the forbidOnly option to false + ✅ should set the forbidOnly option to true +Mocha instance method forbidPending() + ✅ should be chainable + ✅ should set the forbidPending option to false + ✅ should set the forbidPending option to true +Mocha instance method fullTrace() + ✅ should be chainable + ✅ should set the fullTrace option to false + ✅ should set the fullTrace option to true +Mocha instance method global() + ✅ should be an empty array initially + ✅ should be chainable +Mocha instance method global() when argument is invalid + ✅ should not modify the whitelist when given empty array + ✅ should not modify the whitelist when given empty string +Mocha instance method global() when argument is valid + ✅ should add contents of string array to the whitelist + ✅ should add string to the whitelist + ✅ should not have duplicates +Mocha instance method growl() + ✅ should be chainable +Mocha instance method growl() if capable of notifications + ✅ should set the growl option to true +Mocha instance method growl() if not capable of notifications + ✅ should set the growl option to false +Mocha instance method hasGlobalSetupFixtures() when no global setup fixtures are present + ✅ should return `false` +Mocha instance method hasGlobalSetupFixtures() when one or more global setup fixtures are present + ✅ should return `true` +Mocha instance method hasGlobalTeardownFixtures() when no global teardown fixtures are present + ✅ should return `false` +Mocha instance method hasGlobalTeardownFixtures() when one or more global teardown fixtures are present + ✅ should return `true` +Mocha instance method inlineDiffs() + ✅ should be chainable + ✅ should set the inlineDiffs option to false + ✅ should set the inlineDiffs option to true +Mocha instance method invert() + ✅ should be chainable + ✅ should set the invert option to true +Mocha instance method noHighlighting() + ✅ should be chainable + ✅ should set the noHighlighting option to true +Mocha instance method parallelMode() when `Mocha` is running in a browser + ✅ should throw +Mocha instance method reporter() + ✅ should be chainable + ✅ should keep reporterOption on options + ✅ should support legacy reporterOptions +Mocha instance method rootHooks() + ✅ should be chainable +Mocha instance method rootHooks() when provided a single "after all" hook + ✅ should attach it to the root suite +Mocha instance method rootHooks() when provided a single "after each" hook + ✅ should attach it to the root suite +Mocha instance method rootHooks() when provided a single "before all" hook + ✅ should attach it to the root suite +Mocha instance method rootHooks() when provided a single "before each" hook + ✅ should attach it to the root suite +Mocha instance method rootHooks() when provided multiple "after all" hooks + ✅ should attach each to the root suite +Mocha instance method rootHooks() when provided multiple "after each" hooks + ✅ should attach each to the root suite +Mocha instance method rootHooks() when provided multiple "before all" hooks + ✅ should attach each to the root suite +Mocha instance method rootHooks() when provided multiple "before each" hooks + ✅ should attach each to the root suite +Mocha instance method run() + ✅ should execute the callback when complete + ⚪ should initialize the stats collector + ✅ should instantiate a reporter +Mocha instance method run() Base reporter initialization + ✅ should configure the Base reporter +Mocha instance method run() Base reporter initialization when "color" options is set + ✅ should configure the Base reporter +Mocha instance method run() Runner initialization + ✅ should instantiate a Runner +Mocha instance method run() Runner initialization when "global" option is present + ✅ should configure global vars +Mocha instance method run() Runner initialization when "grep" option is present + ✅ should configure "grep" +Mocha instance method run() when "growl" option is present + ✅ should initialize growl support +Mocha instance method run() when a reporter instance has a "done" method + ✅ should call the reporter "done" method +Mocha instance method run() when a run has finished and is called again + ✅ should not call `Runner#runAsync()` + ✅ should throw +Mocha instance method run() when a run is in progress + ✅ should not call `Runner#runAsync` + ✅ should throw +Mocha instance method run() when files have been added to the Mocha instance when Mocha is set to eagerly load files + ✅ should eagerly load files +Mocha instance method run() when files have been added to the Mocha instance when Mocha is set to lazily load files + ✅ should not eagerly load files +Mocha instance method run() when global setup fixtures disabled when global setup fixtures are present + ✅ should not run global setup fixtures +Mocha instance method run() when global setup fixtures disabled when global setup fixtures not present + ✅ should not run global setup fixtures +Mocha instance method run() when global setup fixtures enabled when global setup fixtures are present + ✅ should run global setup fixtures +Mocha instance method run() when global setup fixtures enabled when global setup fixtures not present + ✅ should not run global setup fixtures +Mocha instance method run() when global teardown fixtures disabled when global teardown fixtures are present + ✅ should not run global teardown fixtures +Mocha instance method run() when global teardown fixtures disabled when global teardown fixtures not present + ✅ should not run global teardown fixtures +Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures are present + ✅ should run global teardown fixtures +Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures are present when global setup fixtures are present and enabled + ✅ should use the same context as returned by `runGlobalSetup` +Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures not present + ✅ should not run global teardown fixtures +Mocha instance method run() when Mocha configured for multiple runs and multiple runs are attempted + ✅ should call `Runner#runAsync` for each call + ✅ should dispose the previous runner + ✅ should not throw + ✅ should reset the root Suite between runs +Mocha instance method run() when the `Mocha` instance is already disposed + ✅ should not call `Runner#runAsync` + ✅ should throw +Mocha instance method runGlobalSetup() when a fixture is not present + ✅ should not attempt to run fixtures +Mocha instance method runGlobalSetup() when fixture(s) are present + ✅ should attempt run the fixtures +Mocha instance method runGlobalTeardown() when a fixture is not present + ✅ not attempt to run the fixtures +Mocha instance method runGlobalTeardown() when fixture(s) are present + ✅ should attempt to run the fixtures +Mocha instance method unloadFile() when run in a browser + ✅ should throw +``` +### ✅ test/unit/overspecified-async.spec.js +``` +overspecified asynchronous resolution method + ✅ should fail when multiple methods are used +``` +### ✅ test/unit/parse-query.spec.js +``` +parseQuery() + ✅ should get queryString and return key-value object + ✅ should parse "+" as a space +``` +### ✅ test/unit/plugin-loader.spec.js +``` +plugin module class PluginLoader constructor when passed custom plugins + ✅ should register the custom plugins +plugin module class PluginLoader constructor when passed ignored plugins + ✅ should retain a list of ignored plugins +plugin module class PluginLoader constructor when passed no options + ✅ should populate a registry of built-in plugins +plugin module class PluginLoader instance method finalize() when a plugin has no "finalize" function + ✅ should return an array of raw implementations +plugin module class PluginLoader instance method finalize() when a plugin has one or more implementations + ✅ should omit unused plugins + ✅ should return an object map using `optionName` key for each registered plugin +plugin module class PluginLoader instance method finalize() when no plugins have been loaded + ✅ should return an empty map +plugin module class PluginLoader instance method load() when called with a falsy value + ✅ should return false +plugin module class PluginLoader instance method load() when called with an object containing a recognized plugin + ✅ should call the associated validator, if present + ✅ should retain the value of any matching property in its mapping + ✅ should return true +plugin module class PluginLoader instance method load() when called with an object containing no recognized plugin + ✅ should return false +plugin module class PluginLoader instance method load() when passed a falsy or non-object value + ✅ should not call a validator + ✅ should return false +plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export + ✅ should call the associated validator + ✅ should not call validators whose keys were not found +plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export when the value does not pass the associated validator + ✅ should throw +plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export when the value passes the associated validator + ✅ should add the implementation to the internal mapping + ✅ should not add an implementation of plugins not present + ✅ should return true +plugin module class PluginLoader instance method load() when passed an object value when no keys match any known named exports + ✅ should return false +plugin module class PluginLoader instance method register() when passed a definition w/o an exportName + ✅ should throw +plugin module class PluginLoader instance method register() when passed a falsy parameter + ✅ should throw +plugin module class PluginLoader instance method register() when passed a non-object parameter + ✅ should throw +plugin module class PluginLoader instance method register() when the plugin export name is already in use + ✅ should throw +plugin module class PluginLoader instance method register() when the plugin export name is ignored + ✅ should not register the plugin + ✅ should not throw +plugin module class PluginLoader instance method register() when the plugin export name is not in use + ✅ should not throw +plugin module class PluginLoader static method create() + ✅ should return a PluginLoader instance +plugin module global fixtures plugin global setup when an implementation is a function + ✅ should pass validation +plugin module global fixtures plugin global setup when an implementation is a primitive + ✅ should fail validation +plugin module global fixtures plugin global setup when an implementation is an array of functions + ✅ should pass validation +plugin module global fixtures plugin global setup when an implementation is an array of primitives + ✅ should fail validation +plugin module global fixtures plugin global teardown when an implementation is a function + ✅ should pass validation +plugin module global fixtures plugin global teardown when an implementation is a primitive + ✅ should fail validation +plugin module global fixtures plugin global teardown when an implementation is an array of functions + ✅ should pass validation +plugin module global fixtures plugin global teardown when an implementation is an array of primitives + ✅ should fail validation +plugin module root hooks plugin 🎣 when a loaded impl is finalized + ✅ should flatten the implementations +plugin module root hooks plugin 🎣 when impl is a function + ✅ should pass validation +plugin module root hooks plugin 🎣 when impl is a primitive + ✅ should fail validation +plugin module root hooks plugin 🎣 when impl is an array + ✅ should fail validation +plugin module root hooks plugin 🎣 when impl is an object of functions + ⚪ should pass validation +``` +### ✅ test/unit/required-tokens.spec.js +``` +using imported describe + ✅ using imported it +``` +### ✅ test/unit/root.spec.js +``` +root + ✅ should be a valid suite +``` +### ✅ test/unit/runnable.spec.js +``` +Runnable(title, fn) .run(fn) if async + ✅ this.skip() should halt synchronous execution + ✅ this.skip() should set runnable to pending +Runnable(title, fn) .run(fn) if timed-out + ✅ should ignore call to `done` and not execute callback again +Runnable(title, fn) .run(fn) when .pending + ✅ should not invoke the callback +Runnable(title, fn) .run(fn) when async + ✅ should allow a timeout of 0 + ✅ should allow updating the timeout +Runnable(title, fn) .run(fn) when async when an error is passed + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when async when an exception is thrown + ✅ should invoke the callback + ✅ should not throw its own exception if passed a non-object +Runnable(title, fn) .run(fn) when async when an exception is thrown and is allowed to remain uncaught + ✅ throws an error when it is allowed +Runnable(title, fn) .run(fn) when async when done() is invoked with a non-Error object + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when async when done() is invoked with a string + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when async when the callback is invoked several times with an error + ✅ should emit a single "error" event +Runnable(title, fn) .run(fn) when async when the callback is invoked several times without an error + ✅ should emit a single "error" event +Runnable(title, fn) .run(fn) when async without error + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn is not a function + ✅ should throw an error +Runnable(title, fn) .run(fn) when fn returns a non-promise + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn returns a promise when the promise is fulfilled with a value + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn returns a promise when the promise is fulfilled with no value + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn returns a promise when the promise is rejected + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn returns a promise when the promise is rejected without a reason + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when fn returns a promise when the promise takes too long to settle + ✅ should throw the timeout error +Runnable(title, fn) .run(fn) when sync when an exception is thrown + ✅ should invoke the callback with error +Runnable(title, fn) .run(fn) when sync when an exception is thrown and is allowed to remain uncaught + ✅ throws an error when it is allowed +Runnable(title, fn) .run(fn) when sync without error + ✅ should invoke the callback +Runnable(title, fn) .run(fn) when timeouts are disabled + ✅ should not error with timeout +Runnable(title, fn) .title + ✅ should be present +Runnable(title, fn) .titlePath() + ✅ returns the concatenation of the parent's title path and runnable's title +Runnable(title, fn) #globals + ✅ should allow for whitelisting globals +Runnable(title, fn) #isFailed() + ✅ should return `false` if test is pending + ✅ should return `true` if test has failed + ✅ should return `true` if test has not failed +Runnable(title, fn) #reset + ✅ should reset current run state +Runnable(title, fn) #resetTimeout() + ✅ should not time out if timeouts disabled after reset +Runnable(title, fn) #retries(n) + ✅ should set the number of retries +Runnable(title, fn) #slow(ms) + ✅ should not set the slow threshold if the parameter is not passed + ✅ should not set the slow threshold if the parameter is undefined + ✅ should set the slow threshold +Runnable(title, fn) #slow(ms) when passed a time-formatted string + ✅ should convert to ms +Runnable(title, fn) #timeout(ms) when value is equal to lower bound given numeric value + ✅ should set the timeout value to disabled +Runnable(title, fn) #timeout(ms) when value is equal to lower bound given string timestamp + ✅ should set the timeout value to disabled +Runnable(title, fn) #timeout(ms) when value is equal to upper bound given numeric value + ✅ should set the disabled timeout value +Runnable(title, fn) #timeout(ms) when value is less than lower bound + ✅ should clamp to lower bound given numeric + ✅ should clamp to lower bound given timestamp +Runnable(title, fn) #timeout(ms) when value is out-of-bounds given numeric value + ✅ should set the disabled timeout value +Runnable(title, fn) #timeout(ms) when value is within `setTimeout` bounds given numeric value + ✅ should set the timeout value +Runnable(title, fn) #timeout(ms) when value is within `setTimeout` bounds given string timestamp + ✅ should set the timeout value +Runnable(title, fn) interesting property id + ✅ should have a permanent identifier + ✅ should have a unique identifier +Runnable(title, fn) static method toValueOrError + ✅ should return an Error if parameter is falsy + ✅ should return identity if parameter is truthy +Runnable(title, fn) when arity == 0 + ✅ should be .sync + ✅ should not be .async +Runnable(title, fn) when arity >= 1 + ✅ should be .async + ✅ should not be .sync +``` +### ✅ test/unit/runner.spec.js +``` +Runner instance method _uncaught() when called with a non-Runner context + ✅ should throw +Runner instance method abort() + ✅ should return the Runner + ✅ should set _abort property to true +Runner instance method allowUncaught() + ✅ async - should allow unhandled errors in hooks to propagate through + ✅ should allow unhandled errors in sync hooks to propagate through + ✅ should allow unhandled errors to propagate through + ✅ should not allow unhandled errors in sync hooks to propagate through +Runner instance method checkGlobals(test) + ✅ should allow variables that match a wildcard + ✅ should emit "fail" when a global beginning with "d" is introduced + ✅ should emit "fail" when a new global is introduced + ✅ should emit "fail" when a single new disallowed global is introduced after a single extra global is allowed + ✅ should not fail when a new common global is introduced + ✅ should pluralize the error message when several are introduced + ✅ should respect per test whitelisted globals + ✅ should respect per test whitelisted globals but still detect other leaks +Runner instance method dispose() + ✅ should remove "error" listeners from a test + ✅ should remove "uncaughtException" listeners from the process + ✅ should remove all listeners from itself +Runner instance method fail() + ✅ should emit "fail" + ✅ should emit "fail" + ✅ should emit a helpful message when failed with a string + ✅ should emit a helpful message when failed with an Array + ✅ should emit a helpful message when failed with an Object + ✅ should emit a the error when failed with an Error instance + ✅ should emit the error when failed with an Error-like object + ✅ should increment .failures + ✅ should increment `Runner#failures` + ✅ should not emit "end" if suite bail is not true + ✅ should recover if the error stack is not writable + ✅ should return and not increment failures when test is pending + ✅ should set `Test#state` to "failed" +Runner instance method fail() when Runner has stopped when test is not pending when error is not of the "multiple done" variety + ✅ should throw a "fatal" error +Runner instance method fail() when Runner has stopped when test is not pending when error is the "multiple done" variety + ✅ should throw the "multiple done" error +Runner instance method globalProps() + ✅ should include common non enumerable globals +Runner instance method globals() + ✅ should default to the known globals + ✅ should white-list globals +Runner instance method grep() + ✅ should update the runner.total with number of matched tests + ✅ should update the runner.total with number of matched tests when inverted +Runner instance method grepTotal() + ✅ should return the total number of matched tests + ✅ should return the total number of matched tests when inverted +Runner instance method hook() + ✅ should augment hook title with current test title + ✅ should execute hooks after failed test if suite bail is true +Runner instance method isParallelMode() + ✅ should return false +Runner instance method linkPartialObjects() + ✅ should return the Runner +Runner instance method run() + ✅ should clean references after a run + ✅ should emit "retry" when a retryable test fails + ✅ should not clean references after a run when `cleanReferencesAfterRun` is `false` + ✅ should not leak `Process.uncaughtException` listeners + ✅ should not throw an exception if something emits EVENT_TEST_END with a non-Test object +Runner instance method run() stack traces ginormous + ✅ should not hang if overlong error message is multiple lines + ✅ should not hang if overlong error message is single line +Runner instance method run() stack traces long + ✅ should display the full stack-trace +Runner instance method run() stack traces short + ✅ should prettify the stack-trace +Runner instance method runAsync() + ✅ should pass through options to Runner#run + ✅ should return a Promise with a failure count +Runner instance method runTest() + ✅ should return when no tests to run +Runner instance method uncaught() when allow-uncaught is set to true + ✅ should propagate error and throw +Runner instance method uncaught() when provided an object argument when argument is a Pending + ✅ should ignore argument and return +Runner instance method uncaught() when provided an object argument when argument is an Error + ✅ should add the "uncaught" property to the Error +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run + ✅ should clear any pending timeouts +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when current Runnable has already failed + ✅ should not attempt to fail again +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when current Runnable has been marked pending + ✅ should attempt to fail +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable has already passed + ✅ should abort the runner without emitting end event + ✅ should fail with the current Runnable and the error +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable is still running when the current Runnable is a Hook + ✅ should not notify run has ended + ✅ should not notify test has ended + ✅ should run callback(err) to handle failing hook pattern +Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable is still running when the current Runnable is a Test + ✅ should not notify run has ended + ✅ should not notify test has ended + ✅ should run callback(err) to handle failing and hooks +Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running + ✅ should fail with a transient Runnable and the error +Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is IDLE + ✅ should emit start/end events for the benefit of reporters +Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is RUNNING + ✅ should not emit start/end events +Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is STOPPED + ✅ should not emit start/end events, since this presumably would have already happened + ✅ should throw +Runner instance method uncaught() when provided an object argument when argument is not an Error + ✅ should fail with a transient Runnable and a new Error coerced from the object +Runner instance method workerReporter() + ✅ should throw +``` +### ✅ test/unit/suite.spec.js +``` +Suite instance method addSuite() + ✅ adds the suite to the suites collection + ✅ copies the slow value + ✅ copies the timeout value + ✅ sets the parent on the added Suite + ✅ treats suite as pending if its parent is pending +Suite instance method addTest() + ✅ adds the test to the tests collection + ✅ copies the timeout value + ✅ sets the parent on the added test +Suite instance method afterAll() wraps the passed in function in a Hook + ✅ adds it to _afterAll + ✅ appends title to hook + ✅ uses function name if available +Suite instance method afterEach() wraps the passed in function in a Hook + ✅ adds it to _afterEach + ✅ appends title to hook + ✅ uses function name if available +Suite instance method bail() when argument is passed + ✅ should return the Suite object +Suite instance method bail() when no argument is passed + ✅ should return the bail value +Suite instance method beforeAll() wraps the passed in function in a Hook + ✅ adds it to _beforeAll + ✅ appends title to hook + ✅ uses function name if available +Suite instance method beforeEach() when the suite is pending + ✅ should not create a hook +Suite instance method beforeEach() wraps the passed in function in a Hook + ✅ adds it to _beforeEach + ✅ appends title to hook + ✅ uses function name if available +Suite instance method clone() + ✅ should clone the Suite, omitting children +Suite instance method constructor + ✅ should not throw if the title is a string + ✅ should report listened-for deprecated events as deprecated + ✅ should throw an error if the title isn't a string +Suite instance method create() + ✅ does not create a second root suite + ✅ does not denote the root suite by being titleless +Suite instance method eachTest(fn) when there are no nested suites or tests + ✅ should return 0 +Suite instance method eachTest(fn) when there are several levels of nested suites + ✅ should return the number +Suite instance method eachTest(fn) when there are several tests in the suite + ✅ should return the number +Suite instance method filterOnly() + ✅ should filter out all other tests and suites if a suite has `only` + ✅ should filter out all other tests and suites if a test has `only` +Suite instance method fullTitle() when there is a parent + ✅ returns the combination of parent's and suite's title +Suite instance method fullTitle() when there is no parent + ✅ returns the suite title +Suite instance method hasOnly() + ✅ should return false if no suite or test is marked `only` + ✅ should return true if a suite has `only` + ✅ should return true if a test has `only` + ✅ should return true if nested suite has `only` +Suite instance method markOnly() + ✅ should call appendOnlySuite on parent +Suite instance method reset() + ✅ should forward reset to all hooks + ✅ should forward reset to suites and tests + ✅ should reset the `delayed` state +Suite instance method slow() when argument is passed + ✅ should return the Suite object +Suite instance method slow() when given a string + ✅ should parse it +Suite instance method slow() when no argument is passed + ✅ should return the slow value +Suite instance method timeout() + ✅ should convert a string to milliseconds +Suite instance method timeout() when argument is passed + ✅ should return the Suite object +Suite instance method timeout() when no argument is passed + ✅ should return the timeout value +Suite instance method titlePath() when there is a parent the parent is not the root suite + ✅ returns the concatenation of parent's and suite's title +Suite instance method titlePath() when there is a parent the parent is the root suite + ✅ returns the suite title +Suite instance method titlePath() when there is no parent + ✅ returns the suite title +Suite instance method total() when there are no nested suites or tests + ✅ should return 0 +Suite instance method total() when there are several tests in the suite + ✅ should return the number +Test initialization + ✅ should not throw if the title is a string + ✅ should throw an error if the title isn't a string +``` +### ✅ test/unit/test.spec.js +``` +Test .clone() + ✅ should add/keep the retriedTest value + ✅ should copy the currentRetry value + ✅ should copy the file value + ✅ should copy the globals value + ✅ should copy the parent value + ✅ should copy the retries value + ✅ should copy the slow value + ✅ should copy the timeout value + ✅ should copy the title +Test .isPending() + ✅ should be pending when its parent is pending + ✅ should be pending when marked as such + ✅ should not be pending by default +Test .markOnly() + ✅ should call appendOnlyTest on parent +Test .reset() + ✅ should call Runnable.reset + ✅ should reset the run state +``` +### ✅ test/unit/throw.spec.js +``` +a test that throws non-extensible + ✅ should not pass if throwing async and test is async + ✅ should not pass if throwing sync and test is async + ✅ should not pass if throwing sync and test is sync +a test that throws null + ✅ should not pass if throwing async and test is async + ✅ should not pass if throwing sync and test is async + ✅ should not pass if throwing sync and test is sync +a test that throws undefined + ✅ should not pass if throwing async and test is async + ✅ should not pass if throwing sync and test is async + ✅ should not pass if throwing sync and test is sync +``` +### ✅ test/unit/timeout.spec.js +``` +timeouts + ✅ should allow overriding per-test + ✅ should error on timeout +timeouts disabling + ✅ should work with timeout(0) +timeouts disabling suite-level + ✅ should work with timeout(0) +timeouts disabling suite-level nested suite + ✅ should work with timeout(0) +timeouts disabling using before + ✅ should work with timeout(0) +timeouts disabling using beforeEach + ✅ should work with timeout(0) +timeouts disabling using timeout(0) + ✅ should suppress timeout(4) +``` +### ✅ test/unit/utils.spec.js +``` +lib/utils canonicalType() + ✅ should recognize various types +lib/utils canonicalType() when toString on null or undefined stringifies window + ✅ should recognize null and undefined +lib/utils castArray() when provided a primitive value + ✅ should return an array containing the primitive value only +lib/utils castArray() when provided an "arguments" value + ✅ should return an array containing the arguments +lib/utils castArray() when provided an array value + ✅ should return a copy of the array +lib/utils castArray() when provided an object + ✅ should return an array containing the object only +lib/utils castArray() when provided no parameters + ✅ should return an empty array +lib/utils castArray() when provided null + ✅ should return an array containing a null value only +lib/utils clean() + ✅ should format a multi line test indented with spaces + ✅ should format a multi line test indented with tabs + ✅ should format a single line test function + ✅ should format es6 arrow functions + ✅ should format es6 arrow functions with implicit return + ✅ should format functions saved in windows style - spaces + ✅ should format functions saved in windows style - tabs + ✅ should handle empty functions + ✅ should handle functions with no space between the end and the closing brace + ✅ should handle functions with parentheses in the same line + ✅ should handle functions with tabs in their declarations + ✅ should handle named functions with space after name + ✅ should handle named functions without space after name + ✅ should handle newlines in the function declaration + ✅ should remove space character indentation from the function body + ✅ should remove tab character indentation from the function body + ✅ should remove the wrapping function declaration +lib/utils createMap() + ✅ should add props from all object parameters to the object + ✅ should add props to the object + ✅ should return an object with a null prototype +lib/utils dQuote() + ✅ should return its input as string wrapped in double quotes +lib/utils escape() + ✅ replaces invalid xml characters + ✅ replaces the usual xml suspects +lib/utils isPromise() + ✅ should return false if the object is null + ✅ should return false if the value is an object w/o a "then" function + ✅ should return false if the value is not an object + ✅ should return true if the value is Promise-ish +lib/utils lookupFiles() when run in browser + ✅ should throw +lib/utils lookupFiles() when run in Node.js + ✅ should delegate to new location of lookupFiles() + ✅ should print a deprecation message +lib/utils slug() + ✅ should convert the string to lowercase + ✅ should convert whitespace to dashes + ✅ should disallow consecutive dashes + ✅ should strip non-alphanumeric and non-dash characters +lib/utils sQuote() + ✅ should return its input as string wrapped in single quotes +lib/utils stringify() + ✅ might get confusing + ✅ should canonicalize the object + ✅ should handle arrays + ✅ should handle circular structures in arrays + ✅ should handle circular structures in functions + ✅ should handle circular structures in objects + ✅ should handle empty arrays + ✅ should handle empty functions (with no properties) + ✅ should handle empty objects + ✅ should handle functions + ✅ should handle functions w/ properties + ✅ should handle length properties that cannot be coerced to a number + ✅ should handle non-empty arrays + ✅ should handle object without an Object prototype + ✅ should handle Symbol + ✅ should handle undefined values + ✅ should handle various non-undefined, non-null, non-object, non-array, non-date, and non-function values + ✅ should not freak out if it sees a primitive twice + ✅ should recurse + ✅ should return an object representation of a string created with a String constructor + ✅ should return Buffer with .toJSON representation + ✅ should return Date object with .toISOString() + string prefix + ✅ should return invalid Date object with .toString() + string prefix + ✅ should stringify dates +lib/utils stringify() #Number + ✅ floats and ints + ✅ should show the handle -0 situations + ✅ should work well with `NaN` and `Infinity` + ✅ should work with bigints when possible +lib/utils stringify() canonicalize example + ✅ should represent the actual full result +lib/utils type() + ✅ should recognize various types +lib/utils type() when toString on null or undefined stringifies window + ✅ should recognize null and undefined +lib/utils uniqueID() + ✅ should return a non-empty string +``` +
\ No newline at end of file diff --git a/__tests__/__outputs__/provider-test-results.md b/__tests__/__outputs__/provider-test-results.md index 79b13aa..172f070 100644 --- a/__tests__/__outputs__/provider-test-results.md +++ b/__tests__/__outputs__/provider-test-results.md @@ -1,370 +1,373 @@ ![Tests failed](https://img.shields.io/badge/tests-268%20passed%2C%201%20failed-critical) -## ❌ fixtures/external/flutter/provider-test-results.json +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/flutter/provider-test-results.json](#user-content-r0)|268 ✅|1 ❌||0ms| +## ❌ fixtures/external/flutter/provider-test-results.json **269** tests were completed in **0ms** with **268** passed, **1** failed and **0** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[test/builder_test.dart](#r0s0)|24✔️|||402ms| -|[test/change_notifier_provider_test.dart](#r0s1)|10✔️|||306ms| -|[test/consumer_test.dart](#r0s2)|18✔️|||340ms| -|[test/context_test.dart](#r0s3)|31✔️|||698ms| -|[test/future_provider_test.dart](#r0s4)|10✔️|||305ms| -|[test/inherited_provider_test.dart](#r0s5)|81✔️|||1s| -|[test/listenable_provider_test.dart](#r0s6)|16✔️|||353ms| -|[test/listenable_proxy_provider_test.dart](#r0s7)|12✔️|||373ms| -|[test/multi_provider_test.dart](#r0s8)|3✔️|||198ms| -|[test/provider_test.dart](#r0s9)|11✔️|||306ms| -|[test/proxy_provider_test.dart](#r0s10)|16✔️|||438ms| -|[test/reassemble_test.dart](#r0s11)|3✔️|||221ms| -|[test/selector_test.dart](#r0s12)|17✔️|||364ms| -|[test/stateful_provider_test.dart](#r0s13)|4✔️|||254ms| -|[test/stream_provider_test.dart](#r0s14)|8✔️|||282ms| -|[test/value_listenable_provider_test.dart](#r0s15)|4✔️|1❌||327ms| -### ✔️ test/builder_test.dart +|[test/builder_test.dart](#user-content-r0s0)|24 ✅|||402ms| +|[test/change_notifier_provider_test.dart](#user-content-r0s1)|10 ✅|||306ms| +|[test/consumer_test.dart](#user-content-r0s2)|18 ✅|||340ms| +|[test/context_test.dart](#user-content-r0s3)|31 ✅|||698ms| +|[test/future_provider_test.dart](#user-content-r0s4)|10 ✅|||305ms| +|[test/inherited_provider_test.dart](#user-content-r0s5)|81 ✅|||1s| +|[test/listenable_provider_test.dart](#user-content-r0s6)|16 ✅|||353ms| +|[test/listenable_proxy_provider_test.dart](#user-content-r0s7)|12 ✅|||373ms| +|[test/multi_provider_test.dart](#user-content-r0s8)|3 ✅|||198ms| +|[test/provider_test.dart](#user-content-r0s9)|11 ✅|||306ms| +|[test/proxy_provider_test.dart](#user-content-r0s10)|16 ✅|||438ms| +|[test/reassemble_test.dart](#user-content-r0s11)|3 ✅|||221ms| +|[test/selector_test.dart](#user-content-r0s12)|17 ✅|||364ms| +|[test/stateful_provider_test.dart](#user-content-r0s13)|4 ✅|||254ms| +|[test/stream_provider_test.dart](#user-content-r0s14)|8 ✅|||282ms| +|[test/value_listenable_provider_test.dart](#user-content-r0s15)|4 ✅|1 ❌||327ms| +### ✅ test/builder_test.dart ``` ChangeNotifierProvider - ✔️ default - ✔️ .value + ✅ default + ✅ .value ListenableProvider - ✔️ default - ✔️ .value + ✅ default + ✅ .value Provider - ✔️ default - ✔️ .value + ✅ default + ✅ .value ProxyProvider - ✔️ 0 - ✔️ 1 - ✔️ 2 - ✔️ 3 - ✔️ 4 - ✔️ 5 - ✔️ 6 + ✅ 0 + ✅ 1 + ✅ 2 + ✅ 3 + ✅ 4 + ✅ 5 + ✅ 6 MultiProvider - ✔️ with 1 ChangeNotifierProvider default - ✔️ with 2 ChangeNotifierProvider default - ✔️ with ListenableProvider default - ✔️ with Provider default - ✔️ with ProxyProvider0 - ✔️ with ProxyProvider1 - ✔️ with ProxyProvider2 - ✔️ with ProxyProvider3 - ✔️ with ProxyProvider4 - ✔️ with ProxyProvider5 - ✔️ with ProxyProvider6 + ✅ with 1 ChangeNotifierProvider default + ✅ with 2 ChangeNotifierProvider default + ✅ with ListenableProvider default + ✅ with Provider default + ✅ with ProxyProvider0 + ✅ with ProxyProvider1 + ✅ with ProxyProvider2 + ✅ with ProxyProvider3 + ✅ with ProxyProvider4 + ✅ with ProxyProvider5 + ✅ with ProxyProvider6 ``` -### ✔️ test/change_notifier_provider_test.dart +### ✅ test/change_notifier_provider_test.dart ``` -✔️ Use builder property, not child +✅ Use builder property, not child ChangeNotifierProvider - ✔️ value - ✔️ builder - ✔️ builder1 - ✔️ builder2 - ✔️ builder3 - ✔️ builder4 - ✔️ builder5 - ✔️ builder6 - ✔️ builder0 + ✅ value + ✅ builder + ✅ builder1 + ✅ builder2 + ✅ builder3 + ✅ builder4 + ✅ builder5 + ✅ builder6 + ✅ builder0 ``` -### ✔️ test/consumer_test.dart +### ✅ test/consumer_test.dart ``` consumer - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider consumer2 - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider consumer3 - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider consumer4 - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider consumer5 - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider consumer6 - ✔️ obtains value from Provider - ✔️ crashed with no builder - ✔️ can be used inside MultiProvider + ✅ obtains value from Provider + ✅ crashed with no builder + ✅ can be used inside MultiProvider ``` -### ✔️ test/context_test.dart +### ✅ test/context_test.dart ``` -✔️ watch in layoutbuilder -✔️ select in layoutbuilder -✔️ cannot select in listView -✔️ watch in listView -✔️ watch in gridView -✔️ clears select dependencies for all dependents +✅ watch in layoutbuilder +✅ select in layoutbuilder +✅ cannot select in listView +✅ watch in listView +✅ watch in gridView +✅ clears select dependencies for all dependents BuildContext - ✔️ internal selected value is updated - ✔️ create can use read without being lazy - ✔️ watch can be used inside InheritedProvider.update - ✔️ select doesn't fail if it loads a provider that depends on other providers - ✔️ don't call old selectors if the child rebuilds individually - ✔️ selects throws inside click handlers - ✔️ select throws if try to read dynamic - ✔️ select throws ProviderNotFoundException - ✔️ select throws if watch called inside the callback from build - ✔️ select throws if read called inside the callback from build - ✔️ select throws if select called inside the callback from build - ✔️ select throws if read called inside the callback on dependency change - ✔️ select throws if watch called inside the callback on dependency change - ✔️ select throws if select called inside the callback on dependency change - ✔️ can call read inside didChangeDependencies - ✔️ select cannot be called inside didChangeDependencies - ✔️ select in initState throws - ✔️ watch in initState throws - ✔️ read in initState works - ✔️ consumer can be removed and selector stops to be called - ✔️ context.select deeply compares maps - ✔️ context.select deeply compares lists - ✔️ context.select deeply compares iterables - ✔️ context.select deeply compares sets - ✔️ context.watch listens to value changes + ✅ internal selected value is updated + ✅ create can use read without being lazy + ✅ watch can be used inside InheritedProvider.update + ✅ select doesn't fail if it loads a provider that depends on other providers + ✅ don't call old selectors if the child rebuilds individually + ✅ selects throws inside click handlers + ✅ select throws if try to read dynamic + ✅ select throws ProviderNotFoundException + ✅ select throws if watch called inside the callback from build + ✅ select throws if read called inside the callback from build + ✅ select throws if select called inside the callback from build + ✅ select throws if read called inside the callback on dependency change + ✅ select throws if watch called inside the callback on dependency change + ✅ select throws if select called inside the callback on dependency change + ✅ can call read inside didChangeDependencies + ✅ select cannot be called inside didChangeDependencies + ✅ select in initState throws + ✅ watch in initState throws + ✅ read in initState works + ✅ consumer can be removed and selector stops to be called + ✅ context.select deeply compares maps + ✅ context.select deeply compares lists + ✅ context.select deeply compares iterables + ✅ context.select deeply compares sets + ✅ context.watch listens to value changes ``` -### ✔️ test/future_provider_test.dart +### ✅ test/future_provider_test.dart ``` -✔️ works with MultiProvider -✔️ (catchError) previous future completes after transition is no-op -✔️ previous future completes after transition is no-op -✔️ transition from future to future preserve state -✔️ throws if future has error and catchError is missing -✔️ calls catchError if present and future has error -✔️ works with null -✔️ create and dispose future with builder -✔️ FutureProvider() crashes if builder is null +✅ works with MultiProvider +✅ (catchError) previous future completes after transition is no-op +✅ previous future completes after transition is no-op +✅ transition from future to future preserve state +✅ throws if future has error and catchError is missing +✅ calls catchError if present and future has error +✅ works with null +✅ create and dispose future with builder +✅ FutureProvider() crashes if builder is null FutureProvider() - ✔️ crashes if builder is null + ✅ crashes if builder is null ``` -### ✔️ test/inherited_provider_test.dart +### ✅ test/inherited_provider_test.dart ``` -✔️ regression test #377 -✔️ rebuild on dependency flags update -✔️ properly update debug flags if a create triggers another deferred create -✔️ properly update debug flags if a create triggers another deferred create -✔️ properly update debug flags if an update triggers another create/update -✔️ properly update debug flags if a create triggers another create/update -✔️ Provider.of(listen: false) outside of build works when it loads a provider -✔️ new value is available in didChangeDependencies -✔️ builder receives the current value and updates independently from `update` -✔️ builder can _not_ rebuild when provider updates -✔️ builder rebuilds if provider is recreated -✔️ provider.of throws if listen:true outside of the widget tree -✔️ InheritedProvider throws if no child is provided with default constructor -✔️ InheritedProvider throws if no child is provided with value constructor -✔️ DeferredInheritedProvider throws if no child is provided with default constructor -✔️ DeferredInheritedProvider throws if no child is provided with value constructor -✔️ startListening markNeedsNotifyDependents -✔️ InheritedProvider can be subclassed -✔️ DeferredInheritedProvider can be subclassed -✔️ can be used with MultiProvider -✔️ throw if the widget ctor changes -✔️ InheritedProvider lazy loading can be disabled -✔️ InheritedProvider.value lazy loading can be disabled -✔️ InheritedProvider subclass don't have to specify default lazy value -✔️ DeferredInheritedProvider lazy loading can be disabled -✔️ DeferredInheritedProvider.value lazy loading can be disabled -✔️ selector -✔️ can select multiple types from same provider -✔️ can select same type on two different providers -✔️ can select same type twice on same provider -✔️ Provider.of has a proper error message if context is null +✅ regression test #377 +✅ rebuild on dependency flags update +✅ properly update debug flags if a create triggers another deferred create +✅ properly update debug flags if a create triggers another deferred create +✅ properly update debug flags if an update triggers another create/update +✅ properly update debug flags if a create triggers another create/update +✅ Provider.of(listen: false) outside of build works when it loads a provider +✅ new value is available in didChangeDependencies +✅ builder receives the current value and updates independently from `update` +✅ builder can _not_ rebuild when provider updates +✅ builder rebuilds if provider is recreated +✅ provider.of throws if listen:true outside of the widget tree +✅ InheritedProvider throws if no child is provided with default constructor +✅ InheritedProvider throws if no child is provided with value constructor +✅ DeferredInheritedProvider throws if no child is provided with default constructor +✅ DeferredInheritedProvider throws if no child is provided with value constructor +✅ startListening markNeedsNotifyDependents +✅ InheritedProvider can be subclassed +✅ DeferredInheritedProvider can be subclassed +✅ can be used with MultiProvider +✅ throw if the widget ctor changes +✅ InheritedProvider lazy loading can be disabled +✅ InheritedProvider.value lazy loading can be disabled +✅ InheritedProvider subclass don't have to specify default lazy value +✅ DeferredInheritedProvider lazy loading can be disabled +✅ DeferredInheritedProvider.value lazy loading can be disabled +✅ selector +✅ can select multiple types from same provider +✅ can select same type on two different providers +✅ can select same type twice on same provider +✅ Provider.of has a proper error message if context is null diagnostics - ✔️ InheritedProvider.value - ✔️ InheritedProvider doesn't break lazy loading - ✔️ InheritedProvider show if listening - ✔️ DeferredInheritedProvider.value - ✔️ DeferredInheritedProvider + ✅ InheritedProvider.value + ✅ InheritedProvider doesn't break lazy loading + ✅ InheritedProvider show if listening + ✅ DeferredInheritedProvider.value + ✅ DeferredInheritedProvider InheritedProvider.value() - ✔️ markNeedsNotifyDependents during startListening is noop - ✔️ startListening called again when create returns new value - ✔️ startListening - ✔️ stopListening not called twice if rebuild doesn't have listeners - ✔️ removeListener cannot be null - ✔️ pass down current value - ✔️ default updateShouldNotify - ✔️ custom updateShouldNotify + ✅ markNeedsNotifyDependents during startListening is noop + ✅ startListening called again when create returns new value + ✅ startListening + ✅ stopListening not called twice if rebuild doesn't have listeners + ✅ removeListener cannot be null + ✅ pass down current value + ✅ default updateShouldNotify + ✅ custom updateShouldNotify InheritedProvider() - ✔️ hasValue - ✔️ provider calls update if rebuilding only due to didChangeDependencies - ✔️ provider notifying dependents doesn't call update - ✔️ update can call Provider.of with listen:true - ✔️ update lazy loaded can call Provider.of with listen:true - ✔️ markNeedsNotifyDependents during startListening is noop - ✔️ update can obtain parent of the same type than self - ✔️ _debugCheckInvalidValueType - ✔️ startListening - ✔️ startListening called again when create returns new value - ✔️ stopListening not called twice if rebuild doesn't have listeners - ✔️ removeListener cannot be null - ✔️ fails if initialValueBuilder calls inheritFromElement/inheritFromWiggetOfExactType - ✔️ builder is called on every rebuild and after a dependency change - ✔️ builder with no updateShouldNotify use == - ✔️ builder calls updateShouldNotify callback - ✔️ initialValue is transmitted to valueBuilder - ✔️ calls builder again if dependencies change - ✔️ exposes initialValue if valueBuilder is null - ✔️ call dispose on unmount - ✔️ builder unmount, dispose not called if value never read - ✔️ call dispose after new value - ✔️ valueBuilder works without initialBuilder - ✔️ calls initialValueBuilder lazily once - ✔️ throws if both builder and initialBuilder are missing + ✅ hasValue + ✅ provider calls update if rebuilding only due to didChangeDependencies + ✅ provider notifying dependents doesn't call update + ✅ update can call Provider.of with listen:true + ✅ update lazy loaded can call Provider.of with listen:true + ✅ markNeedsNotifyDependents during startListening is noop + ✅ update can obtain parent of the same type than self + ✅ _debugCheckInvalidValueType + ✅ startListening + ✅ startListening called again when create returns new value + ✅ stopListening not called twice if rebuild doesn't have listeners + ✅ removeListener cannot be null + ✅ fails if initialValueBuilder calls inheritFromElement/inheritFromWiggetOfExactType + ✅ builder is called on every rebuild and after a dependency change + ✅ builder with no updateShouldNotify use == + ✅ builder calls updateShouldNotify callback + ✅ initialValue is transmitted to valueBuilder + ✅ calls builder again if dependencies change + ✅ exposes initialValue if valueBuilder is null + ✅ call dispose on unmount + ✅ builder unmount, dispose not called if value never read + ✅ call dispose after new value + ✅ valueBuilder works without initialBuilder + ✅ calls initialValueBuilder lazily once + ✅ throws if both builder and initialBuilder are missing DeferredInheritedProvider.value() - ✔️ hasValue - ✔️ startListening - ✔️ stopListening cannot be null - ✔️ startListening doesn't need setState if already initialized - ✔️ setState without updateShouldNotify - ✔️ setState with updateShouldNotify - ✔️ startListening never leave the widget uninitialized - ✔️ startListening called again on controller change + ✅ hasValue + ✅ startListening + ✅ stopListening cannot be null + ✅ startListening doesn't need setState if already initialized + ✅ setState without updateShouldNotify + ✅ setState with updateShouldNotify + ✅ startListening never leave the widget uninitialized + ✅ startListening called again on controller change DeferredInheritedProvider() - ✔️ create can't call inherited widgets - ✔️ creates the value lazily - ✔️ dispose - ✔️ dispose no-op if never built + ✅ create can't call inherited widgets + ✅ creates the value lazily + ✅ dispose + ✅ dispose no-op if never built ``` -### ✔️ test/listenable_provider_test.dart +### ✅ test/listenable_provider_test.dart ``` ListenableProvider - ✔️ works with MultiProvider - ✔️ asserts that the created notifier can have listeners - ✔️ don't listen again if listenable instance doesn't change - ✔️ works with null (default) - ✔️ works with null (create) - ✔️ stateful create called once - ✔️ dispose called on unmount - ✔️ dispose can be null - ✔️ changing listenable rebuilds descendants - ✔️ rebuilding with the same provider don't rebuilds descendants - ✔️ notifylistener rebuilds descendants + ✅ works with MultiProvider + ✅ asserts that the created notifier can have listeners + ✅ don't listen again if listenable instance doesn't change + ✅ works with null (default) + ✅ works with null (create) + ✅ stateful create called once + ✅ dispose called on unmount + ✅ dispose can be null + ✅ changing listenable rebuilds descendants + ✅ rebuilding with the same provider don't rebuilds descendants + ✅ notifylistener rebuilds descendants ListenableProvider value constructor - ✔️ pass down key - ✔️ changing the Listenable instance rebuilds dependents + ✅ pass down key + ✅ changing the Listenable instance rebuilds dependents ListenableProvider stateful constructor - ✔️ called with context - ✔️ pass down key - ✔️ throws if create is null + ✅ called with context + ✅ pass down key + ✅ throws if create is null ``` -### ✔️ test/listenable_proxy_provider_test.dart +### ✅ test/listenable_proxy_provider_test.dart ``` ListenableProxyProvider - ✔️ throws if update is missing - ✔️ asserts that the created notifier has no listener - ✔️ asserts that the created notifier has no listener after rebuild - ✔️ rebuilds dependendents when listeners are called - ✔️ update returning a new Listenable disposes the previously created value and update dependents - ✔️ disposes of created value + ✅ throws if update is missing + ✅ asserts that the created notifier has no listener + ✅ asserts that the created notifier has no listener after rebuild + ✅ rebuilds dependendents when listeners are called + ✅ update returning a new Listenable disposes the previously created value and update dependents + ✅ disposes of created value ListenableProxyProvider variants - ✔️ ListenableProxyProvider - ✔️ ListenableProxyProvider2 - ✔️ ListenableProxyProvider3 - ✔️ ListenableProxyProvider4 - ✔️ ListenableProxyProvider5 - ✔️ ListenableProxyProvider6 + ✅ ListenableProxyProvider + ✅ ListenableProxyProvider2 + ✅ ListenableProxyProvider3 + ✅ ListenableProxyProvider4 + ✅ ListenableProxyProvider5 + ✅ ListenableProxyProvider6 ``` -### ✔️ test/multi_provider_test.dart +### ✅ test/multi_provider_test.dart ``` MultiProvider - ✔️ throw if providers is null - ✔️ MultiProvider children can only access parent providers - ✔️ MultiProvider.providers with ignored child + ✅ throw if providers is null + ✅ MultiProvider children can only access parent providers + ✅ MultiProvider.providers with ignored child ``` -### ✔️ test/provider_test.dart +### ✅ test/provider_test.dart ``` -✔️ works with MultiProvider +✅ works with MultiProvider Provider.of - ✔️ throws if T is dynamic - ✔️ listen defaults to true when building widgets - ✔️ listen defaults to false outside of the widget tree - ✔️ listen:false doesn't trigger rebuild - ✔️ listen:true outside of the widget tree throws + ✅ throws if T is dynamic + ✅ listen defaults to true when building widgets + ✅ listen defaults to false outside of the widget tree + ✅ listen:false doesn't trigger rebuild + ✅ listen:true outside of the widget tree throws Provider - ✔️ throws if the provided value is a Listenable/Stream - ✔️ debugCheckInvalidValueType can be disabled - ✔️ simple usage - ✔️ throws an error if no provider found - ✔️ update should notify + ✅ throws if the provided value is a Listenable/Stream + ✅ debugCheckInvalidValueType can be disabled + ✅ simple usage + ✅ throws an error if no provider found + ✅ update should notify ``` -### ✔️ test/proxy_provider_test.dart +### ✅ test/proxy_provider_test.dart ``` ProxyProvider - ✔️ throws if the provided value is a Listenable/Stream - ✔️ debugCheckInvalidValueType can be disabled - ✔️ create creates initial value - ✔️ consume another providers - ✔️ rebuild descendants if value change - ✔️ call dispose when unmounted with the latest result - ✔️ don't rebuild descendants if value doesn't change - ✔️ pass down updateShouldNotify - ✔️ works with MultiProvider - ✔️ update callback can trigger descendants setState synchronously - ✔️ throws if update is null + ✅ throws if the provided value is a Listenable/Stream + ✅ debugCheckInvalidValueType can be disabled + ✅ create creates initial value + ✅ consume another providers + ✅ rebuild descendants if value change + ✅ call dispose when unmounted with the latest result + ✅ don't rebuild descendants if value doesn't change + ✅ pass down updateShouldNotify + ✅ works with MultiProvider + ✅ update callback can trigger descendants setState synchronously + ✅ throws if update is null ProxyProvider variants - ✔️ ProxyProvider2 - ✔️ ProxyProvider3 - ✔️ ProxyProvider4 - ✔️ ProxyProvider5 - ✔️ ProxyProvider6 + ✅ ProxyProvider2 + ✅ ProxyProvider3 + ✅ ProxyProvider4 + ✅ ProxyProvider5 + ✅ ProxyProvider6 ``` -### ✔️ test/reassemble_test.dart +### ✅ test/reassemble_test.dart ``` -✔️ ReassembleHandler -✔️ unevaluated create -✔️ unevaluated create +✅ ReassembleHandler +✅ unevaluated create +✅ unevaluated create ``` -### ✔️ test/selector_test.dart +### ✅ test/selector_test.dart ``` -✔️ asserts that builder/selector are not null -✔️ Deep compare maps by default -✔️ Deep compare iterables by default -✔️ Deep compare sets by default -✔️ Deep compare lists by default -✔️ custom shouldRebuid -✔️ passes `child` and `key` -✔️ calls builder if the callback changes -✔️ works with MultiProvider -✔️ don't call builder again if it rebuilds but selector returns the same thing -✔️ call builder again if it rebuilds abd selector returns the a different variable -✔️ Selector -✔️ Selector2 -✔️ Selector3 -✔️ Selector4 -✔️ Selector5 -✔️ Selector6 +✅ asserts that builder/selector are not null +✅ Deep compare maps by default +✅ Deep compare iterables by default +✅ Deep compare sets by default +✅ Deep compare lists by default +✅ custom shouldRebuid +✅ passes `child` and `key` +✅ calls builder if the callback changes +✅ works with MultiProvider +✅ don't call builder again if it rebuilds but selector returns the same thing +✅ call builder again if it rebuilds abd selector returns the a different variable +✅ Selector +✅ Selector2 +✅ Selector3 +✅ Selector4 +✅ Selector5 +✅ Selector6 ``` -### ✔️ test/stateful_provider_test.dart +### ✅ test/stateful_provider_test.dart ``` -✔️ asserts -✔️ works with MultiProvider -✔️ calls create only once -✔️ dispose +✅ asserts +✅ works with MultiProvider +✅ calls create only once +✅ dispose ``` -### ✔️ test/stream_provider_test.dart +### ✅ test/stream_provider_test.dart ``` -✔️ works with MultiProvider -✔️ transition from stream to stream preserve state -✔️ throws if stream has error and catchError is missing -✔️ calls catchError if present and stream has error -✔️ works with null -✔️ StreamProvider() crashes if builder is null +✅ works with MultiProvider +✅ transition from stream to stream preserve state +✅ throws if stream has error and catchError is missing +✅ calls catchError if present and stream has error +✅ works with null +✅ StreamProvider() crashes if builder is null StreamProvider() - ✔️ create and dispose stream with builder - ✔️ crashes if builder is null + ✅ create and dispose stream with builder + ✅ crashes if builder is null ``` -### ❌ test/value_listenable_provider_test.dart +### ❌ test/value_listenable_provider_test.dart ``` valueListenableProvider - ✔️ rebuilds when value change - ✔️ don't rebuild dependents by default - ✔️ pass keys - ✔️ don't listen again if stream instance doesn't change + ✅ rebuilds when value change + ✅ don't rebuild dependents by default + ✅ pass keys + ✅ don't listen again if stream instance doesn't change ❌ pass updateShouldNotify The following TestFailure object was thrown running a test: Expected: <2> diff --git a/__tests__/__outputs__/pulsar-test-results-no-merge.md b/__tests__/__outputs__/pulsar-test-results-no-merge.md index dbf7601..de5a9b6 100644 --- a/__tests__/__outputs__/pulsar-test-results-no-merge.md +++ b/__tests__/__outputs__/pulsar-test-results-no-merge.md @@ -1,12 +1,15 @@ ![Tests failed](https://img.shields.io/badge/tests-1%20failed%2C%201%20skipped-critical) -## ❌ fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml](#user-content-r0)||1 ❌|1 ⚪|116ms| +## ❌ fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml **2** tests were completed in **116ms** with **0** passed, **1** failed and **1** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[org.apache.pulsar.AddMissingPatchVersionTest](#r0s0)||1❌|1✖️|116ms| -### ❌ org.apache.pulsar.AddMissingPatchVersionTest +|[org.apache.pulsar.AddMissingPatchVersionTest](#user-content-r0s0)||1 ❌|1 ⚪|116ms| +### ❌ org.apache.pulsar.AddMissingPatchVersionTest ``` -✖️ testVersionStrings +⚪ testVersionStrings ❌ testVersionStrings java.lang.AssertionError: expected [1.2.1] but found [1.2.0] ``` \ No newline at end of file diff --git a/__tests__/__outputs__/pulsar-test-results.md b/__tests__/__outputs__/pulsar-test-results.md index 88e8bea..aaaa82e 100644 --- a/__tests__/__outputs__/pulsar-test-results.md +++ b/__tests__/__outputs__/pulsar-test-results.md @@ -1,1518 +1,1521 @@ ![Tests failed](https://img.shields.io/badge/tests-793%20passed%2C%201%20failed%2C%2014%20skipped-critical) -## ❌ fixtures/external/java/pulsar-test-report.xml +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/java/pulsar-test-report.xml](#user-content-r0)|793 ✅|1 ❌|14 ⚪|2127s| +## ❌ fixtures/external/java/pulsar-test-report.xml **808** tests were completed in **2127s** with **793** passed, **1** failed and **14** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[org.apache.pulsar.AddMissingPatchVersionTest](#r0s0)||1❌|1✖️|116ms| -|[org.apache.pulsar.broker.admin.AdminApiOffloadTest](#r0s1)|7✔️|||19s| -|[org.apache.pulsar.broker.auth.AuthenticationServiceTest](#r0s2)|2✔️|||185ms| -|[org.apache.pulsar.broker.auth.AuthLogsTest](#r0s3)|2✔️|||1s| -|[org.apache.pulsar.broker.auth.AuthorizationTest](#r0s4)|1✔️|||2s| -|[org.apache.pulsar.broker.lookup.http.HttpTopicLookupv2Test](#r0s5)|4✔️|||2s| -|[org.apache.pulsar.broker.namespace.NamespaceCreateBundlesTest](#r0s6)|2✔️|||33s| -|[org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests](#r0s7)|2✔️|||32s| -|[org.apache.pulsar.broker.namespace.NamespaceServiceTest](#r0s8)|10✔️|||75s| -|[org.apache.pulsar.broker.namespace.NamespaceUnloadingTest](#r0s9)|2✔️|||14s| -|[org.apache.pulsar.broker.namespace.OwnerShipCacheForCurrentServerTest](#r0s10)|1✔️|||16s| -|[org.apache.pulsar.broker.namespace.OwnershipCacheTest](#r0s11)|8✔️|||16s| -|[org.apache.pulsar.broker.protocol.ProtocolHandlersTest](#r0s12)|6✔️|||946ms| -|[org.apache.pulsar.broker.protocol.ProtocolHandlerUtilsTest](#r0s13)|3✔️|||7s| -|[org.apache.pulsar.broker.protocol.ProtocolHandlerWithClassLoaderTest](#r0s14)|1✔️|||15ms| -|[org.apache.pulsar.broker.PulsarServiceTest](#r0s15)|2✔️|||96ms| -|[org.apache.pulsar.broker.service.MessagePublishBufferThrottleTest](#r0s16)|3✔️|||14s| -|[org.apache.pulsar.broker.service.ReplicatorTest](#r0s17)|22✔️|||40s| -|[org.apache.pulsar.broker.service.TopicOwnerTest](#r0s18)|8✔️|||114s| -|[org.apache.pulsar.broker.SLAMonitoringTest](#r0s19)|4✔️|||9s| -|[org.apache.pulsar.broker.stats.BookieClientsStatsGeneratorTest](#r0s20)|2✔️|||49ms| -|[org.apache.pulsar.broker.stats.ConsumerStatsTest](#r0s21)|3✔️|||21s| -|[org.apache.pulsar.broker.stats.ManagedCursorMetricsTest](#r0s22)|1✔️|||281ms| -|[org.apache.pulsar.broker.stats.ManagedLedgerMetricsTest](#r0s23)|1✔️|||285ms| -|[org.apache.pulsar.broker.stats.prometheus.AggregatedNamespaceStatsTest](#r0s24)|1✔️|||40ms| -|[org.apache.pulsar.broker.stats.PrometheusMetricsTest](#r0s25)|15✔️|||83s| -|[org.apache.pulsar.broker.stats.SubscriptionStatsTest](#r0s26)|2✔️|||2s| -|[org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest](#r0s27)|1✔️|||1s| -|[org.apache.pulsar.broker.transaction.buffer.InMemTransactionBufferReaderTest](#r0s28)|3✔️|||28ms| -|[org.apache.pulsar.broker.transaction.buffer.TransactionBufferClientTest](#r0s29)|4✔️|||93ms| -|[org.apache.pulsar.broker.transaction.buffer.TransactionBufferTest](#r0s30)|7✔️|||81ms| -|[org.apache.pulsar.broker.transaction.buffer.TransactionEntryImplTest](#r0s31)|1✔️|||14ms| -|[org.apache.pulsar.broker.transaction.buffer.TransactionLowWaterMarkTest](#r0s32)|2✔️|||38s| -|[org.apache.pulsar.broker.transaction.buffer.TransactionStablePositionTest](#r0s33)|2✔️||1✖️|49s| -|[org.apache.pulsar.broker.transaction.coordinator.TransactionCoordinatorClientTest](#r0s34)|3✔️|||95ms| -|[org.apache.pulsar.broker.transaction.coordinator.TransactionMetaStoreAssignmentTest](#r0s35)|1✔️|||1s| -|[org.apache.pulsar.broker.transaction.pendingack.PendingAckInMemoryDeleteTest](#r0s36)|2✔️||1✖️|57s| -|[org.apache.pulsar.broker.transaction.TransactionConsumeTest](#r0s37)|2✔️|||30s| -|[org.apache.pulsar.broker.web.RestExceptionTest](#r0s38)|3✔️|||37ms| -|[org.apache.pulsar.broker.web.WebServiceTest](#r0s39)|9✔️|||27s| -|[org.apache.pulsar.client.impl.AdminApiKeyStoreTlsAuthTest](#r0s40)|4✔️|||8s| -|[org.apache.pulsar.client.impl.BatchMessageIdImplSerializationTest](#r0s41)|4✔️|||30ms| -|[org.apache.pulsar.client.impl.BatchMessageIndexAckDisableTest](#r0s42)|4✔️|||14s| -|[org.apache.pulsar.client.impl.BatchMessageIndexAckTest](#r0s43)|5✔️|||44s| -|[org.apache.pulsar.client.impl.BrokerClientIntegrationTest](#r0s44)|15✔️|||148s| -|[org.apache.pulsar.client.impl.CompactedOutBatchMessageTest](#r0s45)|1✔️|||1s| -|[org.apache.pulsar.client.impl.ConsumerAckResponseTest](#r0s46)|1✔️|||549ms| -|[org.apache.pulsar.client.impl.ConsumerConfigurationTest](#r0s47)|4✔️|||12s| -|[org.apache.pulsar.client.impl.ConsumerDedupPermitsUpdate](#r0s48)|7✔️|||4s| -|[org.apache.pulsar.client.impl.ConsumerUnsubscribeTest](#r0s49)|1✔️|||129ms| -|[org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithAuth](#r0s50)|3✔️|||23s| -|[org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithoutAuth](#r0s51)|3✔️|||8s| -|[org.apache.pulsar.client.impl.KeyStoreTlsTest](#r0s52)|1✔️|||183ms| -|[org.apache.pulsar.client.impl.MessageChecksumTest](#r0s53)|3✔️|||47s| -|[org.apache.pulsar.client.impl.MessageChunkingTest](#r0s54)|8✔️||1✖️|73s| -|[org.apache.pulsar.client.impl.MessageParserTest](#r0s55)|2✔️|||5s| -|[org.apache.pulsar.client.impl.MultiTopicsReaderTest](#r0s56)|8✔️|||35s| -|[org.apache.pulsar.client.impl.NegativeAcksTest](#r0s57)|32✔️|||11s| -|[org.apache.pulsar.client.impl.PatternTopicsConsumerImplTest](#r0s58)|11✔️|||63s| -|[org.apache.pulsar.client.impl.PerMessageUnAcknowledgedRedeliveryTest](#r0s59)|5✔️|||34s| -|[org.apache.pulsar.client.impl.PulsarMultiHostClientTest](#r0s60)|3✔️|||15s| -|[org.apache.pulsar.client.impl.RawMessageSerDeserTest](#r0s61)|1✔️|||10ms| -|[org.apache.pulsar.client.impl.SchemaDeleteTest](#r0s62)|1✔️|||2s| -|[org.apache.pulsar.client.impl.SequenceIdWithErrorTest](#r0s63)|3✔️||2✖️|18s| -|[org.apache.pulsar.client.impl.TopicDoesNotExistsTest](#r0s64)|2✔️|||4s| -|[org.apache.pulsar.client.impl.TopicFromMessageTest](#r0s65)|5✔️|||14s| -|[org.apache.pulsar.client.impl.TopicsConsumerImplTest](#r0s66)|17✔️|||133s| -|[org.apache.pulsar.client.impl.UnAcknowledgedMessagesTimeoutTest](#r0s67)|7✔️|||44s| -|[org.apache.pulsar.client.impl.ZeroQueueSizeTest](#r0s68)|14✔️|||16s| -|[org.apache.pulsar.common.api.raw.RawMessageImplTest](#r0s69)|1✔️|||316ms| -|[org.apache.pulsar.common.compression.CommandsTest](#r0s70)|1✔️|||30ms| -|[org.apache.pulsar.common.compression.CompressorCodecBackwardCompatTest](#r0s71)|6✔️|||223ms| -|[org.apache.pulsar.common.compression.CompressorCodecTest](#r0s72)|45✔️|||737ms| -|[org.apache.pulsar.common.compression.Crc32cChecksumTest](#r0s73)|6✔️|||5s| -|[org.apache.pulsar.common.lookup.data.LookupDataTest](#r0s74)|4✔️|||2s| -|[org.apache.pulsar.common.naming.MetadataTests](#r0s75)|2✔️|||161ms| -|[org.apache.pulsar.common.naming.NamespaceBundlesTest](#r0s76)|5✔️|||99ms| -|[org.apache.pulsar.common.naming.NamespaceBundleTest](#r0s77)|6✔️|||64ms| -|[org.apache.pulsar.common.naming.NamespaceNameTest](#r0s78)|2✔️|||207ms| -|[org.apache.pulsar.common.naming.ServiceConfigurationTest](#r0s79)|4✔️|||48ms| -|[org.apache.pulsar.common.naming.TopicNameTest](#r0s80)|4✔️|||529ms| -|[org.apache.pulsar.common.net.ServiceURITest](#r0s81)|21✔️|||237ms| -|[org.apache.pulsar.common.policies.data.AutoFailoverPolicyDataTest](#r0s82)|1✔️|||15ms| -|[org.apache.pulsar.common.policies.data.AutoFailoverPolicyTypeTest](#r0s83)|1✔️|||19ms| -|[org.apache.pulsar.common.policies.data.AutoTopicCreationOverrideTest](#r0s84)|6✔️|||64ms| -|[org.apache.pulsar.common.policies.data.BacklogQuotaTest](#r0s85)|1✔️|||12ms| -|[org.apache.pulsar.common.policies.data.ClusterDataTest](#r0s86)|1✔️|||9ms| -|[org.apache.pulsar.common.policies.data.ConsumerStatsTest](#r0s87)|1✔️|||8ms| -|[org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfigTest](#r0s88)|2✔️|||948ms| -|[org.apache.pulsar.common.policies.data.LocalPolicesTest](#r0s89)|1✔️|||48ms| -|[org.apache.pulsar.common.policies.data.NamespaceIsolationDataTest](#r0s90)|1✔️|||76ms| -|[org.apache.pulsar.common.policies.data.NamespaceOwnershipStatusTest](#r0s91)|1✔️|||45ms| -|[org.apache.pulsar.common.policies.data.OffloadPoliciesTest](#r0s92)|6✔️|||216ms| -|[org.apache.pulsar.common.policies.data.PartitionedTopicStatsTest](#r0s93)|1✔️|||12ms| -|[org.apache.pulsar.common.policies.data.PersistencePoliciesTest](#r0s94)|1✔️|||19ms| -|[org.apache.pulsar.common.policies.data.PersistentOfflineTopicStatsTest](#r0s95)|1✔️|||29ms| -|[org.apache.pulsar.common.policies.data.PersistentTopicStatsTest](#r0s96)|2✔️|||51ms| -|[org.apache.pulsar.common.policies.data.PoliciesDataTest](#r0s97)|4✔️|||1s| -|[org.apache.pulsar.common.policies.data.PublisherStatsTest](#r0s98)|2✔️|||37ms| -|[org.apache.pulsar.common.policies.data.ReplicatorStatsTest](#r0s99)|2✔️|||30ms| -|[org.apache.pulsar.common.policies.data.ResourceQuotaTest](#r0s100)|2✔️|||45ms| -|[org.apache.pulsar.common.policies.data.RetentionPolicesTest](#r0s101)|1✔️|||8ms| -|[org.apache.pulsar.common.policies.impl.AutoFailoverPolicyFactoryTest](#r0s102)|1✔️|||22ms| -|[org.apache.pulsar.common.policies.impl.MinAvailablePolicyTest](#r0s103)|1✔️|||1ms| -|[org.apache.pulsar.common.policies.impl.NamespaceIsolationPoliciesTest](#r0s104)|7✔️|||265ms| -|[org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImplTest](#r0s105)|7✔️|||309ms| -|[org.apache.pulsar.common.protocol.ByteBufPairTest](#r0s106)|2✔️|||5s| -|[org.apache.pulsar.common.protocol.CommandUtilsTests](#r0s107)|7✔️|||3s| -|[org.apache.pulsar.common.protocol.MarkersTest](#r0s108)|6✔️|||3s| -|[org.apache.pulsar.common.protocol.PulsarDecoderTest](#r0s109)|1✔️|||4s| -|[org.apache.pulsar.common.stats.JvmDefaultGCMetricsLoggerTest](#r0s110)|1✔️|||82ms| -|[org.apache.pulsar.common.util.collections.BitSetRecyclableRecyclableTest](#r0s111)|2✔️|||13ms| -|[org.apache.pulsar.common.util.collections.ConcurrentBitSetRecyclableTest](#r0s112)|2✔️|||63ms| -|[org.apache.pulsar.common.util.collections.ConcurrentLongHashMapTest](#r0s113)|13✔️|||28s| -|[org.apache.pulsar.common.util.collections.ConcurrentLongPairSetTest](#r0s114)|15✔️|||2s| -|[org.apache.pulsar.common.util.collections.ConcurrentOpenHashMapTest](#r0s115)|12✔️|||9s| -|[org.apache.pulsar.common.util.collections.ConcurrentOpenHashSetTest](#r0s116)|11✔️|||7s| -|[org.apache.pulsar.common.util.collections.ConcurrentOpenLongPairRangeSetTest](#r0s117)|13✔️|||1s| -|[org.apache.pulsar.common.util.collections.ConcurrentSortedLongPairSetTest](#r0s118)|9✔️|||342ms| -|[org.apache.pulsar.common.util.collections.FieldParserTest](#r0s119)|2✔️|||64ms| -|[org.apache.pulsar.common.util.collections.GrowableArrayBlockingQueueTest](#r0s120)|6✔️|||350ms| -|[org.apache.pulsar.common.util.collections.GrowablePriorityLongPairQueueTest](#r0s121)|15✔️|||3s| -|[org.apache.pulsar.common.util.collections.TripleLongPriorityQueueTest](#r0s122)|3✔️|||238ms| -|[org.apache.pulsar.common.util.FieldParserTest](#r0s123)|1✔️|||242ms| -|[org.apache.pulsar.common.util.FileModifiedTimeUpdaterTest](#r0s124)|6✔️|||6s| -|[org.apache.pulsar.common.util.netty.ChannelFuturesTest](#r0s125)|5✔️|||2s| -|[org.apache.pulsar.common.util.RateLimiterTest](#r0s126)|11✔️|||7s| -|[org.apache.pulsar.common.util.ReflectionsTest](#r0s127)|12✔️|||172ms| -|[org.apache.pulsar.common.util.RelativeTimeUtilTest](#r0s128)|1✔️|||39ms| -|[org.apache.pulsar.discovery.service.web.DiscoveryServiceWebTest](#r0s129)|1✔️|||5s| -|[org.apache.pulsar.functions.worker.PulsarFunctionE2ESecurityTest](#r0s130)|2✔️|||28s| -|[org.apache.pulsar.functions.worker.PulsarFunctionPublishTest](#r0s131)|3✔️|||42s| -|[org.apache.pulsar.functions.worker.PulsarFunctionTlsTest](#r0s132)|1✔️|||12s| -|[org.apache.pulsar.io.PulsarFunctionTlsTest](#r0s133)|1✔️|||30s| -|[org.apache.pulsar.proxy.server.AdminProxyHandlerTest](#r0s134)|1✔️|||474ms| -|[org.apache.pulsar.proxy.server.AuthedAdminProxyHandlerTest](#r0s135)|1✔️|||2s| -|[org.apache.pulsar.proxy.server.FunctionWorkerRoutingTest](#r0s136)|1✔️|||10ms| -|[org.apache.pulsar.proxy.server.ProxyAdditionalServletTest](#r0s137)|1✔️|||125ms| -|[org.apache.pulsar.proxy.server.ProxyAuthenticatedProducerConsumerTest](#r0s138)|1✔️|||2s| -|[org.apache.pulsar.proxy.server.ProxyAuthenticationTest](#r0s139)|1✔️|||17s| -|[org.apache.pulsar.proxy.server.ProxyConnectionThrottlingTest](#r0s140)|1✔️|||2s| -|[org.apache.pulsar.proxy.server.ProxyEnableHAProxyProtocolTest](#r0s141)|1✔️|||511ms| -|[org.apache.pulsar.proxy.server.ProxyForwardAuthDataTest](#r0s142)|1✔️|||32s| -|[org.apache.pulsar.proxy.server.ProxyIsAHttpProxyTest](#r0s143)|10✔️|||2s| -|[org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithAuth](#r0s144)|3✔️|||7s| -|[org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithoutAuth](#r0s145)|3✔️|||7s| -|[org.apache.pulsar.proxy.server.ProxyLookupThrottlingTest](#r0s146)|1✔️|||3s| -|[org.apache.pulsar.proxy.server.ProxyParserTest](#r0s147)|5✔️|||1s| -|[org.apache.pulsar.proxy.server.ProxyRolesEnforcementTest](#r0s148)|1✔️|||10s| -|[org.apache.pulsar.proxy.server.ProxyStatsTest](#r0s149)|3✔️|||533ms| -|[org.apache.pulsar.proxy.server.ProxyTest](#r0s150)|6✔️|||3s| -|[org.apache.pulsar.proxy.server.ProxyTlsTest](#r0s151)|2✔️|||414ms| -|[org.apache.pulsar.proxy.server.ProxyTlsTestWithAuth](#r0s152)|1✔️|||4ms| -|[org.apache.pulsar.proxy.server.ProxyWithAuthorizationNegTest](#r0s153)|1✔️|||2s| -|[org.apache.pulsar.proxy.server.ProxyWithAuthorizationTest](#r0s154)|13✔️|||33s| -|[org.apache.pulsar.proxy.server.ProxyWithoutServiceDiscoveryTest](#r0s155)|1✔️|||2s| -|[org.apache.pulsar.proxy.server.SuperUserAuthedAdminProxyHandlerTest](#r0s156)|3✔️|||8s| -|[org.apache.pulsar.proxy.server.UnauthedAdminProxyHandlerTest](#r0s157)|2✔️|||114ms| -|[org.apache.pulsar.PulsarBrokerStarterTest](#r0s158)|9✔️|||591ms| -|[org.apache.pulsar.schema.compatibility.SchemaCompatibilityCheckTest](#r0s159)|23✔️|||107s| -|[org.apache.pulsar.schema.PartitionedTopicSchemaTest](#r0s160)|1✔️|||29s| -|[org.apache.pulsar.schema.SchemaTest](#r0s161)|3✔️|||31s| -|[org.apache.pulsar.stats.client.PulsarBrokerStatsClientTest](#r0s162)|2✔️|||41s| -|[org.apache.pulsar.tests.EnumValuesDataProviderTest](#r0s163)|6✔️|||23ms| -|[org.apache.pulsar.tests.TestRetrySupportBeforeMethodRetryTest](#r0s164)|1✔️||4✖️|36ms| -|[org.apache.pulsar.tests.TestRetrySupportRetryTest](#r0s165)|1✔️||4✖️|27ms| -|[org.apache.pulsar.tests.TestRetrySupportSuccessTest](#r0s166)|3✔️|||1ms| -|[org.apache.pulsar.tests.ThreadDumpUtilTest](#r0s167)|2✔️|||17ms| -|[org.apache.pulsar.utils.SimpleTextOutputStreamTest](#r0s168)|4✔️|||50ms| -|[org.apache.pulsar.utils.StatsOutputStreamTest](#r0s169)|6✔️|||59ms| -|[org.apache.pulsar.websocket.proxy.ProxyAuthenticationTest](#r0s170)|4✔️|||29s| -|[org.apache.pulsar.websocket.proxy.ProxyAuthorizationTest](#r0s171)|1✔️|||1s| -|[org.apache.pulsar.websocket.proxy.ProxyConfigurationTest](#r0s172)|2✔️|||9s| -|[org.apache.pulsar.websocket.proxy.ProxyPublishConsumeTlsTest](#r0s173)|1✔️|||11s| -|[org.apache.pulsar.websocket.proxy.ProxyPublishConsumeWithoutZKTest](#r0s174)|1✔️|||7s| -|[org.apache.pulsar.websocket.proxy.v1.V1_ProxyAuthenticationTest](#r0s175)|4✔️|||30s| -### ❌ org.apache.pulsar.AddMissingPatchVersionTest +|[org.apache.pulsar.AddMissingPatchVersionTest](#user-content-r0s0)||1 ❌|1 ⚪|116ms| +|[org.apache.pulsar.broker.admin.AdminApiOffloadTest](#user-content-r0s1)|7 ✅|||19s| +|[org.apache.pulsar.broker.auth.AuthenticationServiceTest](#user-content-r0s2)|2 ✅|||185ms| +|[org.apache.pulsar.broker.auth.AuthLogsTest](#user-content-r0s3)|2 ✅|||1s| +|[org.apache.pulsar.broker.auth.AuthorizationTest](#user-content-r0s4)|1 ✅|||2s| +|[org.apache.pulsar.broker.lookup.http.HttpTopicLookupv2Test](#user-content-r0s5)|4 ✅|||2s| +|[org.apache.pulsar.broker.namespace.NamespaceCreateBundlesTest](#user-content-r0s6)|2 ✅|||33s| +|[org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests](#user-content-r0s7)|2 ✅|||32s| +|[org.apache.pulsar.broker.namespace.NamespaceServiceTest](#user-content-r0s8)|10 ✅|||75s| +|[org.apache.pulsar.broker.namespace.NamespaceUnloadingTest](#user-content-r0s9)|2 ✅|||14s| +|[org.apache.pulsar.broker.namespace.OwnerShipCacheForCurrentServerTest](#user-content-r0s10)|1 ✅|||16s| +|[org.apache.pulsar.broker.namespace.OwnershipCacheTest](#user-content-r0s11)|8 ✅|||16s| +|[org.apache.pulsar.broker.protocol.ProtocolHandlersTest](#user-content-r0s12)|6 ✅|||946ms| +|[org.apache.pulsar.broker.protocol.ProtocolHandlerUtilsTest](#user-content-r0s13)|3 ✅|||7s| +|[org.apache.pulsar.broker.protocol.ProtocolHandlerWithClassLoaderTest](#user-content-r0s14)|1 ✅|||15ms| +|[org.apache.pulsar.broker.PulsarServiceTest](#user-content-r0s15)|2 ✅|||96ms| +|[org.apache.pulsar.broker.service.MessagePublishBufferThrottleTest](#user-content-r0s16)|3 ✅|||14s| +|[org.apache.pulsar.broker.service.ReplicatorTest](#user-content-r0s17)|22 ✅|||40s| +|[org.apache.pulsar.broker.service.TopicOwnerTest](#user-content-r0s18)|8 ✅|||114s| +|[org.apache.pulsar.broker.SLAMonitoringTest](#user-content-r0s19)|4 ✅|||9s| +|[org.apache.pulsar.broker.stats.BookieClientsStatsGeneratorTest](#user-content-r0s20)|2 ✅|||49ms| +|[org.apache.pulsar.broker.stats.ConsumerStatsTest](#user-content-r0s21)|3 ✅|||21s| +|[org.apache.pulsar.broker.stats.ManagedCursorMetricsTest](#user-content-r0s22)|1 ✅|||281ms| +|[org.apache.pulsar.broker.stats.ManagedLedgerMetricsTest](#user-content-r0s23)|1 ✅|||285ms| +|[org.apache.pulsar.broker.stats.prometheus.AggregatedNamespaceStatsTest](#user-content-r0s24)|1 ✅|||40ms| +|[org.apache.pulsar.broker.stats.PrometheusMetricsTest](#user-content-r0s25)|15 ✅|||83s| +|[org.apache.pulsar.broker.stats.SubscriptionStatsTest](#user-content-r0s26)|2 ✅|||2s| +|[org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest](#user-content-r0s27)|1 ✅|||1s| +|[org.apache.pulsar.broker.transaction.buffer.InMemTransactionBufferReaderTest](#user-content-r0s28)|3 ✅|||28ms| +|[org.apache.pulsar.broker.transaction.buffer.TransactionBufferClientTest](#user-content-r0s29)|4 ✅|||93ms| +|[org.apache.pulsar.broker.transaction.buffer.TransactionBufferTest](#user-content-r0s30)|7 ✅|||81ms| +|[org.apache.pulsar.broker.transaction.buffer.TransactionEntryImplTest](#user-content-r0s31)|1 ✅|||14ms| +|[org.apache.pulsar.broker.transaction.buffer.TransactionLowWaterMarkTest](#user-content-r0s32)|2 ✅|||38s| +|[org.apache.pulsar.broker.transaction.buffer.TransactionStablePositionTest](#user-content-r0s33)|2 ✅||1 ⚪|49s| +|[org.apache.pulsar.broker.transaction.coordinator.TransactionCoordinatorClientTest](#user-content-r0s34)|3 ✅|||95ms| +|[org.apache.pulsar.broker.transaction.coordinator.TransactionMetaStoreAssignmentTest](#user-content-r0s35)|1 ✅|||1s| +|[org.apache.pulsar.broker.transaction.pendingack.PendingAckInMemoryDeleteTest](#user-content-r0s36)|2 ✅||1 ⚪|57s| +|[org.apache.pulsar.broker.transaction.TransactionConsumeTest](#user-content-r0s37)|2 ✅|||30s| +|[org.apache.pulsar.broker.web.RestExceptionTest](#user-content-r0s38)|3 ✅|||37ms| +|[org.apache.pulsar.broker.web.WebServiceTest](#user-content-r0s39)|9 ✅|||27s| +|[org.apache.pulsar.client.impl.AdminApiKeyStoreTlsAuthTest](#user-content-r0s40)|4 ✅|||8s| +|[org.apache.pulsar.client.impl.BatchMessageIdImplSerializationTest](#user-content-r0s41)|4 ✅|||30ms| +|[org.apache.pulsar.client.impl.BatchMessageIndexAckDisableTest](#user-content-r0s42)|4 ✅|||14s| +|[org.apache.pulsar.client.impl.BatchMessageIndexAckTest](#user-content-r0s43)|5 ✅|||44s| +|[org.apache.pulsar.client.impl.BrokerClientIntegrationTest](#user-content-r0s44)|15 ✅|||148s| +|[org.apache.pulsar.client.impl.CompactedOutBatchMessageTest](#user-content-r0s45)|1 ✅|||1s| +|[org.apache.pulsar.client.impl.ConsumerAckResponseTest](#user-content-r0s46)|1 ✅|||549ms| +|[org.apache.pulsar.client.impl.ConsumerConfigurationTest](#user-content-r0s47)|4 ✅|||12s| +|[org.apache.pulsar.client.impl.ConsumerDedupPermitsUpdate](#user-content-r0s48)|7 ✅|||4s| +|[org.apache.pulsar.client.impl.ConsumerUnsubscribeTest](#user-content-r0s49)|1 ✅|||129ms| +|[org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithAuth](#user-content-r0s50)|3 ✅|||23s| +|[org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithoutAuth](#user-content-r0s51)|3 ✅|||8s| +|[org.apache.pulsar.client.impl.KeyStoreTlsTest](#user-content-r0s52)|1 ✅|||183ms| +|[org.apache.pulsar.client.impl.MessageChecksumTest](#user-content-r0s53)|3 ✅|||47s| +|[org.apache.pulsar.client.impl.MessageChunkingTest](#user-content-r0s54)|8 ✅||1 ⚪|73s| +|[org.apache.pulsar.client.impl.MessageParserTest](#user-content-r0s55)|2 ✅|||5s| +|[org.apache.pulsar.client.impl.MultiTopicsReaderTest](#user-content-r0s56)|8 ✅|||35s| +|[org.apache.pulsar.client.impl.NegativeAcksTest](#user-content-r0s57)|32 ✅|||11s| +|[org.apache.pulsar.client.impl.PatternTopicsConsumerImplTest](#user-content-r0s58)|11 ✅|||63s| +|[org.apache.pulsar.client.impl.PerMessageUnAcknowledgedRedeliveryTest](#user-content-r0s59)|5 ✅|||34s| +|[org.apache.pulsar.client.impl.PulsarMultiHostClientTest](#user-content-r0s60)|3 ✅|||15s| +|[org.apache.pulsar.client.impl.RawMessageSerDeserTest](#user-content-r0s61)|1 ✅|||10ms| +|[org.apache.pulsar.client.impl.SchemaDeleteTest](#user-content-r0s62)|1 ✅|||2s| +|[org.apache.pulsar.client.impl.SequenceIdWithErrorTest](#user-content-r0s63)|3 ✅||2 ⚪|18s| +|[org.apache.pulsar.client.impl.TopicDoesNotExistsTest](#user-content-r0s64)|2 ✅|||4s| +|[org.apache.pulsar.client.impl.TopicFromMessageTest](#user-content-r0s65)|5 ✅|||14s| +|[org.apache.pulsar.client.impl.TopicsConsumerImplTest](#user-content-r0s66)|17 ✅|||133s| +|[org.apache.pulsar.client.impl.UnAcknowledgedMessagesTimeoutTest](#user-content-r0s67)|7 ✅|||44s| +|[org.apache.pulsar.client.impl.ZeroQueueSizeTest](#user-content-r0s68)|14 ✅|||16s| +|[org.apache.pulsar.common.api.raw.RawMessageImplTest](#user-content-r0s69)|1 ✅|||316ms| +|[org.apache.pulsar.common.compression.CommandsTest](#user-content-r0s70)|1 ✅|||30ms| +|[org.apache.pulsar.common.compression.CompressorCodecBackwardCompatTest](#user-content-r0s71)|6 ✅|||223ms| +|[org.apache.pulsar.common.compression.CompressorCodecTest](#user-content-r0s72)|45 ✅|||737ms| +|[org.apache.pulsar.common.compression.Crc32cChecksumTest](#user-content-r0s73)|6 ✅|||5s| +|[org.apache.pulsar.common.lookup.data.LookupDataTest](#user-content-r0s74)|4 ✅|||2s| +|[org.apache.pulsar.common.naming.MetadataTests](#user-content-r0s75)|2 ✅|||161ms| +|[org.apache.pulsar.common.naming.NamespaceBundlesTest](#user-content-r0s76)|5 ✅|||99ms| +|[org.apache.pulsar.common.naming.NamespaceBundleTest](#user-content-r0s77)|6 ✅|||64ms| +|[org.apache.pulsar.common.naming.NamespaceNameTest](#user-content-r0s78)|2 ✅|||207ms| +|[org.apache.pulsar.common.naming.ServiceConfigurationTest](#user-content-r0s79)|4 ✅|||48ms| +|[org.apache.pulsar.common.naming.TopicNameTest](#user-content-r0s80)|4 ✅|||529ms| +|[org.apache.pulsar.common.net.ServiceURITest](#user-content-r0s81)|21 ✅|||237ms| +|[org.apache.pulsar.common.policies.data.AutoFailoverPolicyDataTest](#user-content-r0s82)|1 ✅|||15ms| +|[org.apache.pulsar.common.policies.data.AutoFailoverPolicyTypeTest](#user-content-r0s83)|1 ✅|||19ms| +|[org.apache.pulsar.common.policies.data.AutoTopicCreationOverrideTest](#user-content-r0s84)|6 ✅|||64ms| +|[org.apache.pulsar.common.policies.data.BacklogQuotaTest](#user-content-r0s85)|1 ✅|||12ms| +|[org.apache.pulsar.common.policies.data.ClusterDataTest](#user-content-r0s86)|1 ✅|||9ms| +|[org.apache.pulsar.common.policies.data.ConsumerStatsTest](#user-content-r0s87)|1 ✅|||8ms| +|[org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfigTest](#user-content-r0s88)|2 ✅|||948ms| +|[org.apache.pulsar.common.policies.data.LocalPolicesTest](#user-content-r0s89)|1 ✅|||48ms| +|[org.apache.pulsar.common.policies.data.NamespaceIsolationDataTest](#user-content-r0s90)|1 ✅|||76ms| +|[org.apache.pulsar.common.policies.data.NamespaceOwnershipStatusTest](#user-content-r0s91)|1 ✅|||45ms| +|[org.apache.pulsar.common.policies.data.OffloadPoliciesTest](#user-content-r0s92)|6 ✅|||216ms| +|[org.apache.pulsar.common.policies.data.PartitionedTopicStatsTest](#user-content-r0s93)|1 ✅|||12ms| +|[org.apache.pulsar.common.policies.data.PersistencePoliciesTest](#user-content-r0s94)|1 ✅|||19ms| +|[org.apache.pulsar.common.policies.data.PersistentOfflineTopicStatsTest](#user-content-r0s95)|1 ✅|||29ms| +|[org.apache.pulsar.common.policies.data.PersistentTopicStatsTest](#user-content-r0s96)|2 ✅|||51ms| +|[org.apache.pulsar.common.policies.data.PoliciesDataTest](#user-content-r0s97)|4 ✅|||1s| +|[org.apache.pulsar.common.policies.data.PublisherStatsTest](#user-content-r0s98)|2 ✅|||37ms| +|[org.apache.pulsar.common.policies.data.ReplicatorStatsTest](#user-content-r0s99)|2 ✅|||30ms| +|[org.apache.pulsar.common.policies.data.ResourceQuotaTest](#user-content-r0s100)|2 ✅|||45ms| +|[org.apache.pulsar.common.policies.data.RetentionPolicesTest](#user-content-r0s101)|1 ✅|||8ms| +|[org.apache.pulsar.common.policies.impl.AutoFailoverPolicyFactoryTest](#user-content-r0s102)|1 ✅|||22ms| +|[org.apache.pulsar.common.policies.impl.MinAvailablePolicyTest](#user-content-r0s103)|1 ✅|||1ms| +|[org.apache.pulsar.common.policies.impl.NamespaceIsolationPoliciesTest](#user-content-r0s104)|7 ✅|||265ms| +|[org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImplTest](#user-content-r0s105)|7 ✅|||309ms| +|[org.apache.pulsar.common.protocol.ByteBufPairTest](#user-content-r0s106)|2 ✅|||5s| +|[org.apache.pulsar.common.protocol.CommandUtilsTests](#user-content-r0s107)|7 ✅|||3s| +|[org.apache.pulsar.common.protocol.MarkersTest](#user-content-r0s108)|6 ✅|||3s| +|[org.apache.pulsar.common.protocol.PulsarDecoderTest](#user-content-r0s109)|1 ✅|||4s| +|[org.apache.pulsar.common.stats.JvmDefaultGCMetricsLoggerTest](#user-content-r0s110)|1 ✅|||82ms| +|[org.apache.pulsar.common.util.collections.BitSetRecyclableRecyclableTest](#user-content-r0s111)|2 ✅|||13ms| +|[org.apache.pulsar.common.util.collections.ConcurrentBitSetRecyclableTest](#user-content-r0s112)|2 ✅|||63ms| +|[org.apache.pulsar.common.util.collections.ConcurrentLongHashMapTest](#user-content-r0s113)|13 ✅|||28s| +|[org.apache.pulsar.common.util.collections.ConcurrentLongPairSetTest](#user-content-r0s114)|15 ✅|||2s| +|[org.apache.pulsar.common.util.collections.ConcurrentOpenHashMapTest](#user-content-r0s115)|12 ✅|||9s| +|[org.apache.pulsar.common.util.collections.ConcurrentOpenHashSetTest](#user-content-r0s116)|11 ✅|||7s| +|[org.apache.pulsar.common.util.collections.ConcurrentOpenLongPairRangeSetTest](#user-content-r0s117)|13 ✅|||1s| +|[org.apache.pulsar.common.util.collections.ConcurrentSortedLongPairSetTest](#user-content-r0s118)|9 ✅|||342ms| +|[org.apache.pulsar.common.util.collections.FieldParserTest](#user-content-r0s119)|2 ✅|||64ms| +|[org.apache.pulsar.common.util.collections.GrowableArrayBlockingQueueTest](#user-content-r0s120)|6 ✅|||350ms| +|[org.apache.pulsar.common.util.collections.GrowablePriorityLongPairQueueTest](#user-content-r0s121)|15 ✅|||3s| +|[org.apache.pulsar.common.util.collections.TripleLongPriorityQueueTest](#user-content-r0s122)|3 ✅|||238ms| +|[org.apache.pulsar.common.util.FieldParserTest](#user-content-r0s123)|1 ✅|||242ms| +|[org.apache.pulsar.common.util.FileModifiedTimeUpdaterTest](#user-content-r0s124)|6 ✅|||6s| +|[org.apache.pulsar.common.util.netty.ChannelFuturesTest](#user-content-r0s125)|5 ✅|||2s| +|[org.apache.pulsar.common.util.RateLimiterTest](#user-content-r0s126)|11 ✅|||7s| +|[org.apache.pulsar.common.util.ReflectionsTest](#user-content-r0s127)|12 ✅|||172ms| +|[org.apache.pulsar.common.util.RelativeTimeUtilTest](#user-content-r0s128)|1 ✅|||39ms| +|[org.apache.pulsar.discovery.service.web.DiscoveryServiceWebTest](#user-content-r0s129)|1 ✅|||5s| +|[org.apache.pulsar.functions.worker.PulsarFunctionE2ESecurityTest](#user-content-r0s130)|2 ✅|||28s| +|[org.apache.pulsar.functions.worker.PulsarFunctionPublishTest](#user-content-r0s131)|3 ✅|||42s| +|[org.apache.pulsar.functions.worker.PulsarFunctionTlsTest](#user-content-r0s132)|1 ✅|||12s| +|[org.apache.pulsar.io.PulsarFunctionTlsTest](#user-content-r0s133)|1 ✅|||30s| +|[org.apache.pulsar.proxy.server.AdminProxyHandlerTest](#user-content-r0s134)|1 ✅|||474ms| +|[org.apache.pulsar.proxy.server.AuthedAdminProxyHandlerTest](#user-content-r0s135)|1 ✅|||2s| +|[org.apache.pulsar.proxy.server.FunctionWorkerRoutingTest](#user-content-r0s136)|1 ✅|||10ms| +|[org.apache.pulsar.proxy.server.ProxyAdditionalServletTest](#user-content-r0s137)|1 ✅|||125ms| +|[org.apache.pulsar.proxy.server.ProxyAuthenticatedProducerConsumerTest](#user-content-r0s138)|1 ✅|||2s| +|[org.apache.pulsar.proxy.server.ProxyAuthenticationTest](#user-content-r0s139)|1 ✅|||17s| +|[org.apache.pulsar.proxy.server.ProxyConnectionThrottlingTest](#user-content-r0s140)|1 ✅|||2s| +|[org.apache.pulsar.proxy.server.ProxyEnableHAProxyProtocolTest](#user-content-r0s141)|1 ✅|||511ms| +|[org.apache.pulsar.proxy.server.ProxyForwardAuthDataTest](#user-content-r0s142)|1 ✅|||32s| +|[org.apache.pulsar.proxy.server.ProxyIsAHttpProxyTest](#user-content-r0s143)|10 ✅|||2s| +|[org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithAuth](#user-content-r0s144)|3 ✅|||7s| +|[org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithoutAuth](#user-content-r0s145)|3 ✅|||7s| +|[org.apache.pulsar.proxy.server.ProxyLookupThrottlingTest](#user-content-r0s146)|1 ✅|||3s| +|[org.apache.pulsar.proxy.server.ProxyParserTest](#user-content-r0s147)|5 ✅|||1s| +|[org.apache.pulsar.proxy.server.ProxyRolesEnforcementTest](#user-content-r0s148)|1 ✅|||10s| +|[org.apache.pulsar.proxy.server.ProxyStatsTest](#user-content-r0s149)|3 ✅|||533ms| +|[org.apache.pulsar.proxy.server.ProxyTest](#user-content-r0s150)|6 ✅|||3s| +|[org.apache.pulsar.proxy.server.ProxyTlsTest](#user-content-r0s151)|2 ✅|||414ms| +|[org.apache.pulsar.proxy.server.ProxyTlsTestWithAuth](#user-content-r0s152)|1 ✅|||4ms| +|[org.apache.pulsar.proxy.server.ProxyWithAuthorizationNegTest](#user-content-r0s153)|1 ✅|||2s| +|[org.apache.pulsar.proxy.server.ProxyWithAuthorizationTest](#user-content-r0s154)|13 ✅|||33s| +|[org.apache.pulsar.proxy.server.ProxyWithoutServiceDiscoveryTest](#user-content-r0s155)|1 ✅|||2s| +|[org.apache.pulsar.proxy.server.SuperUserAuthedAdminProxyHandlerTest](#user-content-r0s156)|3 ✅|||8s| +|[org.apache.pulsar.proxy.server.UnauthedAdminProxyHandlerTest](#user-content-r0s157)|2 ✅|||114ms| +|[org.apache.pulsar.PulsarBrokerStarterTest](#user-content-r0s158)|9 ✅|||591ms| +|[org.apache.pulsar.schema.compatibility.SchemaCompatibilityCheckTest](#user-content-r0s159)|23 ✅|||107s| +|[org.apache.pulsar.schema.PartitionedTopicSchemaTest](#user-content-r0s160)|1 ✅|||29s| +|[org.apache.pulsar.schema.SchemaTest](#user-content-r0s161)|3 ✅|||31s| +|[org.apache.pulsar.stats.client.PulsarBrokerStatsClientTest](#user-content-r0s162)|2 ✅|||41s| +|[org.apache.pulsar.tests.EnumValuesDataProviderTest](#user-content-r0s163)|6 ✅|||23ms| +|[org.apache.pulsar.tests.TestRetrySupportBeforeMethodRetryTest](#user-content-r0s164)|1 ✅||4 ⚪|36ms| +|[org.apache.pulsar.tests.TestRetrySupportRetryTest](#user-content-r0s165)|1 ✅||4 ⚪|27ms| +|[org.apache.pulsar.tests.TestRetrySupportSuccessTest](#user-content-r0s166)|3 ✅|||1ms| +|[org.apache.pulsar.tests.ThreadDumpUtilTest](#user-content-r0s167)|2 ✅|||17ms| +|[org.apache.pulsar.utils.SimpleTextOutputStreamTest](#user-content-r0s168)|4 ✅|||50ms| +|[org.apache.pulsar.utils.StatsOutputStreamTest](#user-content-r0s169)|6 ✅|||59ms| +|[org.apache.pulsar.websocket.proxy.ProxyAuthenticationTest](#user-content-r0s170)|4 ✅|||29s| +|[org.apache.pulsar.websocket.proxy.ProxyAuthorizationTest](#user-content-r0s171)|1 ✅|||1s| +|[org.apache.pulsar.websocket.proxy.ProxyConfigurationTest](#user-content-r0s172)|2 ✅|||9s| +|[org.apache.pulsar.websocket.proxy.ProxyPublishConsumeTlsTest](#user-content-r0s173)|1 ✅|||11s| +|[org.apache.pulsar.websocket.proxy.ProxyPublishConsumeWithoutZKTest](#user-content-r0s174)|1 ✅|||7s| +|[org.apache.pulsar.websocket.proxy.v1.V1_ProxyAuthenticationTest](#user-content-r0s175)|4 ✅|||30s| +### ❌ org.apache.pulsar.AddMissingPatchVersionTest ``` -✖️ testVersionStrings +⚪ testVersionStrings ❌ testVersionStrings java.lang.AssertionError: expected [1.2.1] but found [1.2.0] ``` -### ✔️ org.apache.pulsar.broker.admin.AdminApiOffloadTest +### ✅ org.apache.pulsar.broker.admin.AdminApiOffloadTest ``` -✔️ testOffloadPoliciesAppliedApi -✔️ testOffloadV2 -✔️ testTopicLevelOffloadNonPartitioned -✔️ testTopicLevelOffloadPartitioned -✔️ testOffloadV1 -✔️ testOffloadPolicies -✔️ testOffloadPoliciesApi +✅ testOffloadPoliciesAppliedApi +✅ testOffloadV2 +✅ testTopicLevelOffloadNonPartitioned +✅ testTopicLevelOffloadPartitioned +✅ testOffloadV1 +✅ testOffloadPolicies +✅ testOffloadPoliciesApi ``` -### ✔️ org.apache.pulsar.broker.auth.AuthenticationServiceTest +### ✅ org.apache.pulsar.broker.auth.AuthenticationServiceTest ``` -✔️ testAuthentication -✔️ testAuthenticationHttp +✅ testAuthentication +✅ testAuthenticationHttp ``` -### ✔️ org.apache.pulsar.broker.auth.AuthLogsTest +### ✅ org.apache.pulsar.broker.auth.AuthLogsTest ``` -✔️ httpEndpoint -✔️ binaryEndpoint +✅ httpEndpoint +✅ binaryEndpoint ``` -### ✔️ org.apache.pulsar.broker.auth.AuthorizationTest +### ✅ org.apache.pulsar.broker.auth.AuthorizationTest ``` -✔️ simple +✅ simple ``` -### ✔️ org.apache.pulsar.broker.lookup.http.HttpTopicLookupv2Test +### ✅ org.apache.pulsar.broker.lookup.http.HttpTopicLookupv2Test ``` -✔️ crossColoLookup -✔️ testNotEnoughLookupPermits -✔️ testValidateReplicationSettingsOnNamespace -✔️ testDataPojo +✅ crossColoLookup +✅ testNotEnoughLookupPermits +✅ testValidateReplicationSettingsOnNamespace +✅ testDataPojo ``` -### ✔️ org.apache.pulsar.broker.namespace.NamespaceCreateBundlesTest +### ✅ org.apache.pulsar.broker.namespace.NamespaceCreateBundlesTest ``` -✔️ testCreateNamespaceWithDefaultBundles -✔️ testSplitBundleUpdatesLocalPoliciesWithoutOverwriting +✅ testCreateNamespaceWithDefaultBundles +✅ testSplitBundleUpdatesLocalPoliciesWithoutOverwriting ``` -### ✔️ org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests +### ✅ org.apache.pulsar.broker.namespace.NamespaceOwnershipListenerTests ``` -✔️ testGetAllPartitions -✔️ testNamespaceBundleOwnershipListener +✅ testGetAllPartitions +✅ testNamespaceBundleOwnershipListener ``` -### ✔️ org.apache.pulsar.broker.namespace.NamespaceServiceTest +### ✅ org.apache.pulsar.broker.namespace.NamespaceServiceTest ``` -✔️ testSplitMapWithRefreshedStatMap -✔️ testRemoveOwnershipNamespaceBundle -✔️ testIsServiceUnitDisabled -✔️ testLoadReportDeserialize -✔️ testCreateLookupResult -✔️ testUnloadNamespaceBundleWithStuckTopic -✔️ testUnloadNamespaceBundleFailure -✔️ testSplitAndOwnBundles -✔️ testCreateNamespaceWithDefaultNumberOfBundles -✔️ testRemoveOwnershipAndSplitBundle +✅ testSplitMapWithRefreshedStatMap +✅ testRemoveOwnershipNamespaceBundle +✅ testIsServiceUnitDisabled +✅ testLoadReportDeserialize +✅ testCreateLookupResult +✅ testUnloadNamespaceBundleWithStuckTopic +✅ testUnloadNamespaceBundleFailure +✅ testSplitAndOwnBundles +✅ testCreateNamespaceWithDefaultNumberOfBundles +✅ testRemoveOwnershipAndSplitBundle ``` -### ✔️ org.apache.pulsar.broker.namespace.NamespaceUnloadingTest +### ✅ org.apache.pulsar.broker.namespace.NamespaceUnloadingTest ``` -✔️ testUnloadNotLoadedNamespace -✔️ testUnloadPartiallyLoadedNamespace +✅ testUnloadNotLoadedNamespace +✅ testUnloadPartiallyLoadedNamespace ``` -### ✔️ org.apache.pulsar.broker.namespace.OwnerShipCacheForCurrentServerTest +### ✅ org.apache.pulsar.broker.namespace.OwnerShipCacheForCurrentServerTest ``` -✔️ testOwnershipForCurrentServer +✅ testOwnershipForCurrentServer ``` -### ✔️ org.apache.pulsar.broker.namespace.OwnershipCacheTest +### ✅ org.apache.pulsar.broker.namespace.OwnershipCacheTest ``` -✔️ testGetOwnedServiceUnits -✔️ testRemoveOwnership -✔️ testGetOwnedServiceUnit -✔️ testGetOrSetOwner -✔️ testConstructor -✔️ testGetOwner -✔️ testDisableOwnership -✔️ testReestablishOwnership +✅ testGetOwnedServiceUnits +✅ testRemoveOwnership +✅ testGetOwnedServiceUnit +✅ testGetOrSetOwner +✅ testConstructor +✅ testGetOwner +✅ testDisableOwnership +✅ testReestablishOwnership ``` -### ✔️ org.apache.pulsar.broker.protocol.ProtocolHandlersTest +### ✅ org.apache.pulsar.broker.protocol.ProtocolHandlersTest ``` -✔️ testStart -✔️ testGetProtocol -✔️ testNewChannelInitializersSuccess -✔️ testInitialize -✔️ testNewChannelInitializersOverlapped -✔️ testGetProtocolDataToAdvertise +✅ testStart +✅ testGetProtocol +✅ testNewChannelInitializersSuccess +✅ testInitialize +✅ testNewChannelInitializersOverlapped +✅ testGetProtocolDataToAdvertise ``` -### ✔️ org.apache.pulsar.broker.protocol.ProtocolHandlerUtilsTest +### ✅ org.apache.pulsar.broker.protocol.ProtocolHandlerUtilsTest ``` -✔️ testLoadProtocolHandler -✔️ testLoadProtocolHandlerBlankHandlerClass -✔️ testLoadProtocolHandlerWrongHandlerClass +✅ testLoadProtocolHandler +✅ testLoadProtocolHandlerBlankHandlerClass +✅ testLoadProtocolHandlerWrongHandlerClass ``` -### ✔️ org.apache.pulsar.broker.protocol.ProtocolHandlerWithClassLoaderTest +### ✅ org.apache.pulsar.broker.protocol.ProtocolHandlerWithClassLoaderTest ``` -✔️ testWrapper +✅ testWrapper ``` -### ✔️ org.apache.pulsar.broker.PulsarServiceTest +### ✅ org.apache.pulsar.broker.PulsarServiceTest ``` -✔️ testGetWorkerService -✔️ testGetWorkerServiceException +✅ testGetWorkerService +✅ testGetWorkerServiceException ``` -### ✔️ org.apache.pulsar.broker.service.MessagePublishBufferThrottleTest +### ✅ org.apache.pulsar.broker.service.MessagePublishBufferThrottleTest ``` -✔️ testMessagePublishBufferThrottleEnable -✔️ testBlockByPublishRateLimiting -✔️ testMessagePublishBufferThrottleDisabled +✅ testMessagePublishBufferThrottleEnable +✅ testBlockByPublishRateLimiting +✅ testMessagePublishBufferThrottleDisabled ``` -### ✔️ org.apache.pulsar.broker.service.ReplicatorTest +### ✅ org.apache.pulsar.broker.service.ReplicatorTest ``` -✔️ testResumptionAfterBacklogRelaxed -✔️ testReplicationOverrides -✔️ testResetCursorNotFail -✔️ testUpdateGlobalTopicPartition -✔️ testReplication -✔️ testReplicatorOnPartitionedTopic -✔️ testConcurrentReplicator -✔️ testTopicReplicatedAndProducerCreate -✔️ testDeleteReplicatorFailure -✔️ testReplicatorOnPartitionedTopic -✔️ testReplicationForBatchMessages -✔️ testReplicatorClearBacklog -✔️ verifyChecksumAfterReplication -✔️ testCloseReplicatorStartProducer -✔️ activeBrokerParse -✔️ testReplicatePeekAndSkip -✔️ testReplication -✔️ testReplicatedCluster -✔️ testTopicReplicatedAndProducerCreate -✔️ testConfigChange -✔️ testFailures -✔️ testReplicatorProducerClosing +✅ testResumptionAfterBacklogRelaxed +✅ testReplicationOverrides +✅ testResetCursorNotFail +✅ testUpdateGlobalTopicPartition +✅ testReplication +✅ testReplicatorOnPartitionedTopic +✅ testConcurrentReplicator +✅ testTopicReplicatedAndProducerCreate +✅ testDeleteReplicatorFailure +✅ testReplicatorOnPartitionedTopic +✅ testReplicationForBatchMessages +✅ testReplicatorClearBacklog +✅ verifyChecksumAfterReplication +✅ testCloseReplicatorStartProducer +✅ activeBrokerParse +✅ testReplicatePeekAndSkip +✅ testReplication +✅ testReplicatedCluster +✅ testTopicReplicatedAndProducerCreate +✅ testConfigChange +✅ testFailures +✅ testReplicatorProducerClosing ``` -### ✔️ org.apache.pulsar.broker.service.TopicOwnerTest +### ✅ org.apache.pulsar.broker.service.TopicOwnerTest ``` -✔️ testReleaseOwnershipWithZookeeperDisconnectedBeforeOwnershipNodeDeleted -✔️ testAcquireOwnershipWithZookeeperDisconnectedAfterOwnershipNodeCreated -✔️ testConnectToInvalidateBundleCacheBroker -✔️ testAcquireOwnershipWithZookeeperDisconnectedBeforeOwnershipNodeCreated -✔️ testLookupPartitionedTopic -✔️ testListNonPersistentTopic -✔️ testReleaseOwnershipWithZookeeperDisconnectedAfterOwnershipNodeDeleted -✔️ testReestablishOwnershipAfterInvalidateCache +✅ testReleaseOwnershipWithZookeeperDisconnectedBeforeOwnershipNodeDeleted +✅ testAcquireOwnershipWithZookeeperDisconnectedAfterOwnershipNodeCreated +✅ testConnectToInvalidateBundleCacheBroker +✅ testAcquireOwnershipWithZookeeperDisconnectedBeforeOwnershipNodeCreated +✅ testLookupPartitionedTopic +✅ testListNonPersistentTopic +✅ testReleaseOwnershipWithZookeeperDisconnectedAfterOwnershipNodeDeleted +✅ testReestablishOwnershipAfterInvalidateCache ``` -### ✔️ org.apache.pulsar.broker.SLAMonitoringTest +### ✅ org.apache.pulsar.broker.SLAMonitoringTest ``` -✔️ testOwnedNamespaces -✔️ testOwnershipAfterSetup -✔️ testUnloadIfBrokerCrashes -✔️ testOwnershipViaAdminAfterSetup +✅ testOwnedNamespaces +✅ testOwnershipAfterSetup +✅ testUnloadIfBrokerCrashes +✅ testOwnershipViaAdminAfterSetup ``` -### ✔️ org.apache.pulsar.broker.stats.BookieClientsStatsGeneratorTest +### ✅ org.apache.pulsar.broker.stats.BookieClientsStatsGeneratorTest ``` -✔️ testJvmDirectMemoryUsedMetric -✔️ testBookieClientStatsGenerator +✅ testJvmDirectMemoryUsedMetric +✅ testBookieClientStatsGenerator ``` -### ✔️ org.apache.pulsar.broker.stats.ConsumerStatsTest +### ✅ org.apache.pulsar.broker.stats.ConsumerStatsTest ``` -✔️ testAckStatsOnPartitionedTopicForExclusiveSubscription -✔️ testConsumerStatsOnZeroMaxUnackedMessagesPerConsumer -✔️ testUpdateStatsForActiveConsumerAndSubscription +✅ testAckStatsOnPartitionedTopicForExclusiveSubscription +✅ testConsumerStatsOnZeroMaxUnackedMessagesPerConsumer +✅ testUpdateStatsForActiveConsumerAndSubscription ``` -### ✔️ org.apache.pulsar.broker.stats.ManagedCursorMetricsTest +### ✅ org.apache.pulsar.broker.stats.ManagedCursorMetricsTest ``` -✔️ testManagedCursorMetrics +✅ testManagedCursorMetrics ``` -### ✔️ org.apache.pulsar.broker.stats.ManagedLedgerMetricsTest +### ✅ org.apache.pulsar.broker.stats.ManagedLedgerMetricsTest ``` -✔️ testManagedLedgerMetrics +✅ testManagedLedgerMetrics ``` -### ✔️ org.apache.pulsar.broker.stats.prometheus.AggregatedNamespaceStatsTest +### ✅ org.apache.pulsar.broker.stats.prometheus.AggregatedNamespaceStatsTest ``` -✔️ testSimpleAggregation +✅ testSimpleAggregation ``` -### ✔️ org.apache.pulsar.broker.stats.PrometheusMetricsTest +### ✅ org.apache.pulsar.broker.stats.PrometheusMetricsTest ``` -✔️ testPerTopicStats -✔️ testAuthMetrics -✔️ testPerTopicExpiredStat -✔️ testPerProducerStats -✔️ testMetricsTopicCount -✔️ testManagedLedgerBookieClientStats -✔️ testDuplicateMetricTypeDefinitions -✔️ testExpiringTokenMetrics -✔️ testPerConsumerStats -✔️ testPerNamespaceStats -✔️ testManagedCursorPersistStats -✔️ testDuplicateMetricTypeDefinitions -✔️ testExpiredTokenMetrics -✔️ testManagedLedgerCacheStats -✔️ testManagedLedgerStats +✅ testPerTopicStats +✅ testAuthMetrics +✅ testPerTopicExpiredStat +✅ testPerProducerStats +✅ testMetricsTopicCount +✅ testManagedLedgerBookieClientStats +✅ testDuplicateMetricTypeDefinitions +✅ testExpiringTokenMetrics +✅ testPerConsumerStats +✅ testPerNamespaceStats +✅ testManagedCursorPersistStats +✅ testDuplicateMetricTypeDefinitions +✅ testExpiredTokenMetrics +✅ testManagedLedgerCacheStats +✅ testManagedLedgerStats ``` -### ✔️ org.apache.pulsar.broker.stats.SubscriptionStatsTest +### ✅ org.apache.pulsar.broker.stats.SubscriptionStatsTest ``` -✔️ testConsumersAfterMarkDelete -✔️ testNonContiguousDeletedMessagesRanges +✅ testConsumersAfterMarkDelete +✅ testNonContiguousDeletedMessagesRanges ``` -### ✔️ org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest +### ✅ org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest ``` -✔️ testSendAndReceiveNamespaceEvents +✅ testSendAndReceiveNamespaceEvents ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.InMemTransactionBufferReaderTest +### ✅ org.apache.pulsar.broker.transaction.buffer.InMemTransactionBufferReaderTest ``` -✔️ testCloseReleaseAllEntries -✔️ testInvalidNumEntriesArgument -✔️ testEndOfTransactionException +✅ testCloseReleaseAllEntries +✅ testInvalidNumEntriesArgument +✅ testEndOfTransactionException ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.TransactionBufferClientTest +### ✅ org.apache.pulsar.broker.transaction.buffer.TransactionBufferClientTest ``` -✔️ testAbortOnTopic -✔️ testAbortOnSubscription -✔️ testCommitOnTopic -✔️ testCommitOnSubscription +✅ testAbortOnTopic +✅ testAbortOnSubscription +✅ testCommitOnTopic +✅ testCommitOnSubscription ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.TransactionBufferTest +### ✅ org.apache.pulsar.broker.transaction.buffer.TransactionBufferTest ``` -✔️ testOpenReaderOnNonExistentTxn -✔️ testAbortCommittedTxn -✔️ testAbortTxn -✔️ testAbortNonExistentTxn -✔️ testCommitNonExistentTxn -✔️ testCommitTxn -✔️ testOpenReaderOnAnOpenTxn +✅ testOpenReaderOnNonExistentTxn +✅ testAbortCommittedTxn +✅ testAbortTxn +✅ testAbortNonExistentTxn +✅ testCommitNonExistentTxn +✅ testCommitTxn +✅ testOpenReaderOnAnOpenTxn ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.TransactionEntryImplTest +### ✅ org.apache.pulsar.broker.transaction.buffer.TransactionEntryImplTest ``` -✔️ testCloseShouldReleaseBuffer +✅ testCloseShouldReleaseBuffer ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.TransactionLowWaterMarkTest +### ✅ org.apache.pulsar.broker.transaction.buffer.TransactionLowWaterMarkTest ``` -✔️ testTransactionBufferLowWaterMark -✔️ testPendingAckLowWaterMark +✅ testTransactionBufferLowWaterMark +✅ testPendingAckLowWaterMark ``` -### ✔️ org.apache.pulsar.broker.transaction.buffer.TransactionStablePositionTest +### ✅ org.apache.pulsar.broker.transaction.buffer.TransactionStablePositionTest ``` -✔️ commitTxnTest -✔️ abortTxnTest -✖️ commitTxnTest +✅ commitTxnTest +✅ abortTxnTest +⚪ commitTxnTest ``` -### ✔️ org.apache.pulsar.broker.transaction.coordinator.TransactionCoordinatorClientTest +### ✅ org.apache.pulsar.broker.transaction.coordinator.TransactionCoordinatorClientTest ``` -✔️ testClientStart -✔️ testCommitAndAbort -✔️ testNewTxn +✅ testClientStart +✅ testCommitAndAbort +✅ testNewTxn ``` -### ✔️ org.apache.pulsar.broker.transaction.coordinator.TransactionMetaStoreAssignmentTest +### ✅ org.apache.pulsar.broker.transaction.coordinator.TransactionMetaStoreAssignmentTest ``` -✔️ testTransactionMetaStoreAssignAndFailover +✅ testTransactionMetaStoreAssignAndFailover ``` -### ✔️ org.apache.pulsar.broker.transaction.pendingack.PendingAckInMemoryDeleteTest +### ✅ org.apache.pulsar.broker.transaction.pendingack.PendingAckInMemoryDeleteTest ``` -✖️ txnAckTestNoBatchAndSharedSubMemoryDeleteTest -✔️ txnAckTestNoBatchAndSharedSubMemoryDeleteTest -✔️ txnAckTestBatchAndSharedSubMemoryDeleteTest +⚪ txnAckTestNoBatchAndSharedSubMemoryDeleteTest +✅ txnAckTestNoBatchAndSharedSubMemoryDeleteTest +✅ txnAckTestBatchAndSharedSubMemoryDeleteTest ``` -### ✔️ org.apache.pulsar.broker.transaction.TransactionConsumeTest +### ✅ org.apache.pulsar.broker.transaction.TransactionConsumeTest ``` -✔️ noSortedTest -✔️ sortedTest +✅ noSortedTest +✅ sortedTest ``` -### ✔️ org.apache.pulsar.broker.web.RestExceptionTest +### ✅ org.apache.pulsar.broker.web.RestExceptionTest ``` -✔️ testRestException -✔️ testWebApplicationException -✔️ testOtherException +✅ testRestException +✅ testWebApplicationException +✅ testOtherException ``` -### ✔️ org.apache.pulsar.broker.web.WebServiceTest +### ✅ org.apache.pulsar.broker.web.WebServiceTest ``` -✔️ testTlsAuthDisallowInsecure -✔️ testBrokerReady -✔️ testDefaultClientVersion -✔️ testTlsEnabled -✔️ testTlsAuthAllowInsecure -✔️ testSplitPath -✔️ testMaxRequestSize -✔️ testTlsDisabled -✔️ testRateLimiting +✅ testTlsAuthDisallowInsecure +✅ testBrokerReady +✅ testDefaultClientVersion +✅ testTlsEnabled +✅ testTlsAuthAllowInsecure +✅ testSplitPath +✅ testMaxRequestSize +✅ testTlsDisabled +✅ testRateLimiting ``` -### ✔️ org.apache.pulsar.client.impl.AdminApiKeyStoreTlsAuthTest +### ✅ org.apache.pulsar.client.impl.AdminApiKeyStoreTlsAuthTest ``` -✔️ testAuthorizedUserAsOriginalPrincipal -✔️ testSuperUserCantListNamespaces -✔️ testPersistentList -✔️ testSuperUserCanListTenants +✅ testAuthorizedUserAsOriginalPrincipal +✅ testSuperUserCantListNamespaces +✅ testPersistentList +✅ testSuperUserCanListTenants ``` -### ✔️ org.apache.pulsar.client.impl.BatchMessageIdImplSerializationTest +### ✅ org.apache.pulsar.client.impl.BatchMessageIdImplSerializationTest ``` -✔️ testSerializationEmpty -✔️ testSerialization1 -✔️ testSerializationNull -✔️ testSerialization2 +✅ testSerializationEmpty +✅ testSerialization1 +✅ testSerializationNull +✅ testSerialization2 ``` -### ✔️ org.apache.pulsar.client.impl.BatchMessageIndexAckDisableTest +### ✅ org.apache.pulsar.client.impl.BatchMessageIndexAckDisableTest ``` -✔️ testBatchMessageIndexAckForExclusiveSubscription -✔️ testBatchMessageIndexAckForSharedSubscription -✔️ testBatchMessageIndexAckForExclusiveSubscription -✔️ testBatchMessageIndexAckForSharedSubscription +✅ testBatchMessageIndexAckForExclusiveSubscription +✅ testBatchMessageIndexAckForSharedSubscription +✅ testBatchMessageIndexAckForExclusiveSubscription +✅ testBatchMessageIndexAckForSharedSubscription ``` -### ✔️ org.apache.pulsar.client.impl.BatchMessageIndexAckTest +### ✅ org.apache.pulsar.client.impl.BatchMessageIndexAckTest ``` -✔️ testBatchMessageIndexAckForSharedSubscription -✔️ testBatchMessageIndexAckForSharedSubscription -✔️ testDoNotRecycleAckSetMultipleTimes -✔️ testBatchMessageIndexAckForExclusiveSubscription -✔️ testBatchMessageIndexAckForExclusiveSubscription +✅ testBatchMessageIndexAckForSharedSubscription +✅ testBatchMessageIndexAckForSharedSubscription +✅ testDoNotRecycleAckSetMultipleTimes +✅ testBatchMessageIndexAckForExclusiveSubscription +✅ testBatchMessageIndexAckForExclusiveSubscription ``` -### ✔️ org.apache.pulsar.client.impl.BrokerClientIntegrationTest +### ✅ org.apache.pulsar.client.impl.BrokerClientIntegrationTest ``` -✔️ testDisconnectClientWithoutClosingConnection -✔️ testResetCursor -✔️ testResetCursor -✔️ testCloseBrokerService -✔️ testUnsupportedBatchMessageConsumer -✔️ testAvroSchemaProducerConsumerWithSpecifiedReaderAndWriter -✔️ testJsonSchemaProducerConsumerWithSpecifiedReaderAndWriter -✔️ testOperationTimeout -✔️ testCleanProducer -✔️ testUnsupportedBatchMessageConsumer -✔️ testCloseConnectionOnBrokerRejectedRequest -✔️ testAddEntryOperationTimeout -✔️ testInvalidDynamicConfiguration -✔️ testMaxConcurrentTopicLoading -✔️ testCloseConnectionOnInternalServerError +✅ testDisconnectClientWithoutClosingConnection +✅ testResetCursor +✅ testResetCursor +✅ testCloseBrokerService +✅ testUnsupportedBatchMessageConsumer +✅ testAvroSchemaProducerConsumerWithSpecifiedReaderAndWriter +✅ testJsonSchemaProducerConsumerWithSpecifiedReaderAndWriter +✅ testOperationTimeout +✅ testCleanProducer +✅ testUnsupportedBatchMessageConsumer +✅ testCloseConnectionOnBrokerRejectedRequest +✅ testAddEntryOperationTimeout +✅ testInvalidDynamicConfiguration +✅ testMaxConcurrentTopicLoading +✅ testCloseConnectionOnInternalServerError ``` -### ✔️ org.apache.pulsar.client.impl.CompactedOutBatchMessageTest +### ✅ org.apache.pulsar.client.impl.CompactedOutBatchMessageTest ``` -✔️ testCompactedOutMessages +✅ testCompactedOutMessages ``` -### ✔️ org.apache.pulsar.client.impl.ConsumerAckResponseTest +### ✅ org.apache.pulsar.client.impl.ConsumerAckResponseTest ``` -✔️ testAckResponse +✅ testAckResponse ``` -### ✔️ org.apache.pulsar.client.impl.ConsumerConfigurationTest -``` -✔️ testReadCompactNonPersistentExclusive -✔️ testReadCompactPersistentExclusive -✔️ testReadCompactPersistentFailover -✔️ testReadCompactPersistentShared -``` -### ✔️ org.apache.pulsar.client.impl.ConsumerDedupPermitsUpdate -``` -✔️ testConsumerDedup -✔️ testConsumerDedup -✔️ testConsumerDedup -✔️ testConsumerDedup -✔️ testConsumerDedup -✔️ testConsumerDedup -✔️ testConsumerDedup -``` -### ✔️ org.apache.pulsar.client.impl.ConsumerUnsubscribeTest -``` -✔️ testConsumerUnsubscribeReference -``` -### ✔️ org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithAuth -``` -✔️ testTlsClientAuthOverHTTPProtocol -✔️ testTlsClientAuthOverBinaryProtocol -✔️ testTlsLargeSizeMessage -``` -### ✔️ org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithoutAuth -``` -✔️ testTlsClientAuthOverHTTPProtocol -✔️ testTlsClientAuthOverBinaryProtocol -✔️ testTlsLargeSizeMessage -``` -### ✔️ org.apache.pulsar.client.impl.KeyStoreTlsTest -``` -✔️ testValidate -``` -### ✔️ org.apache.pulsar.client.impl.MessageChecksumTest -``` -✔️ testChecksumCompatibilityInMixedVersionBrokerCluster -✔️ testTamperingMessageIsDetected -✔️ testChecksumCompatibilityInMixedVersionBrokerCluster -``` -### ✔️ org.apache.pulsar.client.impl.MessageChunkingTest -``` -✔️ testPublishWithFailure -✔️ testInvalidUseCaseForChunking -✔️ testLargeMessage -✔️ testExpireIncompleteChunkMessage -✔️ testInvalidConfig -✔️ testLargeMessageAckTimeOut -✔️ testLargeMessageAckTimeOut -✔️ testLargeMessage -✖️ testMaxPendingChunkMessages -``` -### ✔️ org.apache.pulsar.client.impl.MessageParserTest -``` -✔️ testWithoutBatches -✔️ testWithBatches -``` -### ✔️ org.apache.pulsar.client.impl.MultiTopicsReaderTest -``` -✔️ testReadMessageWithBatchingWithMessageInclusive -✔️ testKeyHashRangeReader -✔️ testRemoveSubscriptionForReaderNeedRemoveCursor -✔️ testReadMessageWithBatching -✔️ testReadMessageWithoutBatchingWithMessageInclusive -✔️ testMultiReaderSeek -✔️ testReadMessageWithoutBatching -✔️ testReaderWithTimeLong -``` -### ✔️ org.apache.pulsar.client.impl.NegativeAcksTest -``` -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -✔️ testNegativeAcks -``` -### ✔️ org.apache.pulsar.client.impl.PatternTopicsConsumerImplTest -``` -✔️ testStartEmptyPatternConsumer -✔️ testBinaryProtoToGetTopicsOfNamespaceAll -✔️ testPatternTopicsSubscribeWithBuilderFail -✔️ testPubRateOnNonPersistent -✔️ testTopicDeletion -✔️ testAutoUnbubscribePatternConsumer -✔️ testTopicsPatternFilter -✔️ testBinaryProtoToGetTopicsOfNamespaceNonPersistent -✔️ testBinaryProtoToGetTopicsOfNamespacePersistent -✔️ testTopicsListMinus -✔️ testAutoSubscribePatternConsumer -``` -### ✔️ org.apache.pulsar.client.impl.PerMessageUnAcknowledgedRedeliveryTest -``` -✔️ testSharedAckedNormalTopic -✔️ testUnAckedMessageTrackerSize -✔️ testSharedAckedPartitionedTopic -✔️ testExclusiveAckedNormalTopic -✔️ testFailoverAckedNormalTopic -``` -### ✔️ org.apache.pulsar.client.impl.PulsarMultiHostClientTest -``` -✔️ testMultiHostUrlRetrySuccess -✔️ testGetPartitionedTopicDataTimeout -✔️ testGetPartitionedTopicMetaData -``` -### ✔️ org.apache.pulsar.client.impl.RawMessageSerDeserTest -``` -✔️ testSerializationAndDeserialization -``` -### ✔️ org.apache.pulsar.client.impl.SchemaDeleteTest -``` -✔️ createTopicDeleteTopicCreateTopic -``` -### ✔️ org.apache.pulsar.client.impl.SequenceIdWithErrorTest -``` -✔️ testCheckSequenceId -✔️ testDeleteTopicWithMissingData -✔️ testTopicWithWildCardChar -✖️ testCrashBrokerWithoutCursorLedgerLeak -✖️ testSkipCorruptDataLedger -``` -### ✔️ org.apache.pulsar.client.impl.TopicDoesNotExistsTest -``` -✔️ testCreateConsumerOnNotExistsTopic -✔️ testCreateProducerOnNotExistsTopic -``` -### ✔️ org.apache.pulsar.client.impl.TopicFromMessageTest -``` -✔️ testSingleTopicConsumerNoBatchFullName -✔️ testMultiTopicConsumerBatchShortName -✔️ testSingleTopicConsumerNoBatchShortName -✔️ testMultiTopicConsumerNoBatchShortName -✔️ testSingleTopicConsumerBatchShortName -``` -### ✔️ org.apache.pulsar.client.impl.TopicsConsumerImplTest -``` -✔️ testTopicAutoUpdatePartitions -✔️ testDifferentTopicsNameSubscribe -✔️ testGetLastMessageId -✔️ testConsumerUnackedRedelivery -✔️ testSubscriptionMustCompleteWhenOperationTimeoutOnMultipleTopics -✔️ testConsumerDistributionInFailoverSubscriptionWhenUpdatePartitions -✔️ multiTopicsInDifferentNameSpace -✔️ testDefaultBacklogTTL -✔️ testGetConsumersAndGetTopics -✔️ testSubscribeUnsubscribeSingleTopic -✔️ testResubscribeSameTopic -✔️ testSyncProducerAndConsumer -✔️ testPartitionsUpdatesForMultipleTopics -✔️ testTopicsNameSubscribeWithBuilderFail -✔️ testMultiTopicsMessageListener -✔️ testTopicNameValid -✔️ testAsyncConsumer -``` -### ✔️ org.apache.pulsar.client.impl.UnAcknowledgedMessagesTimeoutTest -``` -✔️ testCheckUnAcknowledgedMessageTimer -✔️ testExclusiveSingleAckedNormalTopic -✔️ testFailoverSingleAckedPartitionedTopic -✔️ testSharedSingleAckedPartitionedTopic -✔️ testAckTimeoutMinValue -✔️ testExclusiveCumulativeAckedNormalTopic -✔️ testSingleMessageBatch -``` -### ✔️ org.apache.pulsar.client.impl.ZeroQueueSizeTest -``` -✔️ zeroQueueSizeSharedSubscription -✔️ testPauseAndResume -✔️ testZeroQueueSizeMessageRedeliveryForAsyncReceive -✔️ zeroQueueSizeConsumerListener -✔️ zeroQueueSizeFailoverSubscription -✔️ validQueueSizeConfig -✔️ zeroQueueSizeNormalConsumer -✔️ zeroQueueSizeReceieveAsyncInCompatibility -✔️ InvalidQueueSizeConfig -✔️ testZeroQueueSizeMessageRedeliveryForListener -✔️ testZeroQueueSizeMessageRedelivery -✔️ zeroQueueSizePartitionedTopicInCompatibility -✔️ testFailedZeroQueueSizeBatchMessage -✔️ testPauseAndResumeWithUnloading -``` -### ✔️ org.apache.pulsar.common.api.raw.RawMessageImplTest -``` -✔️ testGetProperties -``` -### ✔️ org.apache.pulsar.common.compression.CommandsTest -``` -✔️ testChecksumSendCommand -``` -### ✔️ org.apache.pulsar.common.compression.CompressorCodecBackwardCompatTest -``` -✔️ testCompressDecompress -✔️ testCompressDecompress -✔️ testCompressDecompress -✔️ testCompressDecompress -✔️ testCompressDecompress -✔️ testCompressDecompress -``` -### ✔️ org.apache.pulsar.common.compression.CompressorCodecTest -``` -✔️ testCompressDecompress -✔️ testMultpileUsages -✔️ testMultpileUsages -✔️ testCompressDecompress -✔️ testMultpileUsages -✔️ testCompressDecompress -✔️ testMultpileUsages -✔️ testCompressDecompress -✔️ testDecompressFromSampleBuffer -✔️ testDecompressReadonlyByteBuf -✔️ testDecompressReadonlyByteBuf -✔️ testCodecProvider -✔️ testEmptyInput -✔️ testEmptyInput -✔️ testCompressDecompress -✔️ testCodecProvider -✔️ testDecompressFromSampleBuffer -✔️ testMultpileUsages -✔️ testCodecProvider -✔️ testEmptyInput -✔️ testDecompressReadonlyByteBuf -✔️ testCompressDecompress -✔️ testDecompressReadonlyByteBuf -✔️ testCompressDecompress -✔️ testCompressDecompress -✔️ testMultpileUsages -✔️ testEmptyInput -✔️ testDecompressReadonlyByteBuf -✔️ testDecompressFromSampleBuffer -✔️ testDecompressFromSampleBuffer -✔️ testDecompressFromSampleBuffer -✔️ testDecompressReadonlyByteBuf -✔️ testDecompressReadonlyByteBuf -✔️ testMultpileUsages -✔️ testCompressDecompress -✔️ testCodecProvider -✔️ testMultpileUsages -✔️ testCompressDecompress -✔️ testMultpileUsages -✔️ testDecompressReadonlyByteBuf -✔️ testEmptyInput -✔️ testCodecProvider -✔️ testDecompressReadonlyByteBuf -✔️ testDecompressReadonlyByteBuf -✔️ testMultpileUsages -``` -### ✔️ org.apache.pulsar.common.compression.Crc32cChecksumTest -``` -✔️ testCrc32cHardware -✔️ testCrc32cDirectMemoryHardware -✔️ testCrc32c -✔️ testCrc32cSoftware -✔️ testCrc32cIncremental -✔️ testCrc32cIncrementalUsingProvider -``` -### ✔️ org.apache.pulsar.common.lookup.data.LookupDataTest -``` -✔️ testLoadReportSerialization -✔️ testUrlEncoder -✔️ serializeToJsonTest -✔️ withConstructor -``` -### ✔️ org.apache.pulsar.common.naming.MetadataTests -``` -✔️ testInvalidMetadata -✔️ testValidMetadata -``` -### ✔️ org.apache.pulsar.common.naming.NamespaceBundlesTest -``` -✔️ testConstructor -✔️ testSplitBundleInTwo -✔️ testsplitBundles -✔️ testFindBundle -✔️ testSplitBundleByFixBoundary -``` -### ✔️ org.apache.pulsar.common.naming.NamespaceBundleTest -``` -✔️ testIncludes -✔️ testGetBundle -✔️ testCompareTo -✔️ testConstructor -✔️ testToString -✔️ testEquals -``` -### ✔️ org.apache.pulsar.common.naming.NamespaceNameTest -``` -✔️ namespace -✔️ testNewScheme -``` -### ✔️ org.apache.pulsar.common.naming.ServiceConfigurationTest -``` -✔️ testOptionalSettingPresent -✔️ testOptionalSettingEmpty -✔️ testInit -✔️ testInitFailure +### ✅ org.apache.pulsar.client.impl.ConsumerConfigurationTest +``` +✅ testReadCompactNonPersistentExclusive +✅ testReadCompactPersistentExclusive +✅ testReadCompactPersistentFailover +✅ testReadCompactPersistentShared +``` +### ✅ org.apache.pulsar.client.impl.ConsumerDedupPermitsUpdate +``` +✅ testConsumerDedup +✅ testConsumerDedup +✅ testConsumerDedup +✅ testConsumerDedup +✅ testConsumerDedup +✅ testConsumerDedup +✅ testConsumerDedup +``` +### ✅ org.apache.pulsar.client.impl.ConsumerUnsubscribeTest +``` +✅ testConsumerUnsubscribeReference +``` +### ✅ org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithAuth +``` +✅ testTlsClientAuthOverHTTPProtocol +✅ testTlsClientAuthOverBinaryProtocol +✅ testTlsLargeSizeMessage +``` +### ✅ org.apache.pulsar.client.impl.KeyStoreTlsProducerConsumerTestWithoutAuth +``` +✅ testTlsClientAuthOverHTTPProtocol +✅ testTlsClientAuthOverBinaryProtocol +✅ testTlsLargeSizeMessage +``` +### ✅ org.apache.pulsar.client.impl.KeyStoreTlsTest +``` +✅ testValidate +``` +### ✅ org.apache.pulsar.client.impl.MessageChecksumTest +``` +✅ testChecksumCompatibilityInMixedVersionBrokerCluster +✅ testTamperingMessageIsDetected +✅ testChecksumCompatibilityInMixedVersionBrokerCluster +``` +### ✅ org.apache.pulsar.client.impl.MessageChunkingTest +``` +✅ testPublishWithFailure +✅ testInvalidUseCaseForChunking +✅ testLargeMessage +✅ testExpireIncompleteChunkMessage +✅ testInvalidConfig +✅ testLargeMessageAckTimeOut +✅ testLargeMessageAckTimeOut +✅ testLargeMessage +⚪ testMaxPendingChunkMessages +``` +### ✅ org.apache.pulsar.client.impl.MessageParserTest +``` +✅ testWithoutBatches +✅ testWithBatches +``` +### ✅ org.apache.pulsar.client.impl.MultiTopicsReaderTest +``` +✅ testReadMessageWithBatchingWithMessageInclusive +✅ testKeyHashRangeReader +✅ testRemoveSubscriptionForReaderNeedRemoveCursor +✅ testReadMessageWithBatching +✅ testReadMessageWithoutBatchingWithMessageInclusive +✅ testMultiReaderSeek +✅ testReadMessageWithoutBatching +✅ testReaderWithTimeLong +``` +### ✅ org.apache.pulsar.client.impl.NegativeAcksTest +``` +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +✅ testNegativeAcks +``` +### ✅ org.apache.pulsar.client.impl.PatternTopicsConsumerImplTest +``` +✅ testStartEmptyPatternConsumer +✅ testBinaryProtoToGetTopicsOfNamespaceAll +✅ testPatternTopicsSubscribeWithBuilderFail +✅ testPubRateOnNonPersistent +✅ testTopicDeletion +✅ testAutoUnbubscribePatternConsumer +✅ testTopicsPatternFilter +✅ testBinaryProtoToGetTopicsOfNamespaceNonPersistent +✅ testBinaryProtoToGetTopicsOfNamespacePersistent +✅ testTopicsListMinus +✅ testAutoSubscribePatternConsumer +``` +### ✅ org.apache.pulsar.client.impl.PerMessageUnAcknowledgedRedeliveryTest +``` +✅ testSharedAckedNormalTopic +✅ testUnAckedMessageTrackerSize +✅ testSharedAckedPartitionedTopic +✅ testExclusiveAckedNormalTopic +✅ testFailoverAckedNormalTopic +``` +### ✅ org.apache.pulsar.client.impl.PulsarMultiHostClientTest +``` +✅ testMultiHostUrlRetrySuccess +✅ testGetPartitionedTopicDataTimeout +✅ testGetPartitionedTopicMetaData +``` +### ✅ org.apache.pulsar.client.impl.RawMessageSerDeserTest +``` +✅ testSerializationAndDeserialization +``` +### ✅ org.apache.pulsar.client.impl.SchemaDeleteTest +``` +✅ createTopicDeleteTopicCreateTopic +``` +### ✅ org.apache.pulsar.client.impl.SequenceIdWithErrorTest +``` +✅ testCheckSequenceId +✅ testDeleteTopicWithMissingData +✅ testTopicWithWildCardChar +⚪ testCrashBrokerWithoutCursorLedgerLeak +⚪ testSkipCorruptDataLedger +``` +### ✅ org.apache.pulsar.client.impl.TopicDoesNotExistsTest +``` +✅ testCreateConsumerOnNotExistsTopic +✅ testCreateProducerOnNotExistsTopic +``` +### ✅ org.apache.pulsar.client.impl.TopicFromMessageTest +``` +✅ testSingleTopicConsumerNoBatchFullName +✅ testMultiTopicConsumerBatchShortName +✅ testSingleTopicConsumerNoBatchShortName +✅ testMultiTopicConsumerNoBatchShortName +✅ testSingleTopicConsumerBatchShortName +``` +### ✅ org.apache.pulsar.client.impl.TopicsConsumerImplTest +``` +✅ testTopicAutoUpdatePartitions +✅ testDifferentTopicsNameSubscribe +✅ testGetLastMessageId +✅ testConsumerUnackedRedelivery +✅ testSubscriptionMustCompleteWhenOperationTimeoutOnMultipleTopics +✅ testConsumerDistributionInFailoverSubscriptionWhenUpdatePartitions +✅ multiTopicsInDifferentNameSpace +✅ testDefaultBacklogTTL +✅ testGetConsumersAndGetTopics +✅ testSubscribeUnsubscribeSingleTopic +✅ testResubscribeSameTopic +✅ testSyncProducerAndConsumer +✅ testPartitionsUpdatesForMultipleTopics +✅ testTopicsNameSubscribeWithBuilderFail +✅ testMultiTopicsMessageListener +✅ testTopicNameValid +✅ testAsyncConsumer +``` +### ✅ org.apache.pulsar.client.impl.UnAcknowledgedMessagesTimeoutTest +``` +✅ testCheckUnAcknowledgedMessageTimer +✅ testExclusiveSingleAckedNormalTopic +✅ testFailoverSingleAckedPartitionedTopic +✅ testSharedSingleAckedPartitionedTopic +✅ testAckTimeoutMinValue +✅ testExclusiveCumulativeAckedNormalTopic +✅ testSingleMessageBatch +``` +### ✅ org.apache.pulsar.client.impl.ZeroQueueSizeTest +``` +✅ zeroQueueSizeSharedSubscription +✅ testPauseAndResume +✅ testZeroQueueSizeMessageRedeliveryForAsyncReceive +✅ zeroQueueSizeConsumerListener +✅ zeroQueueSizeFailoverSubscription +✅ validQueueSizeConfig +✅ zeroQueueSizeNormalConsumer +✅ zeroQueueSizeReceieveAsyncInCompatibility +✅ InvalidQueueSizeConfig +✅ testZeroQueueSizeMessageRedeliveryForListener +✅ testZeroQueueSizeMessageRedelivery +✅ zeroQueueSizePartitionedTopicInCompatibility +✅ testFailedZeroQueueSizeBatchMessage +✅ testPauseAndResumeWithUnloading +``` +### ✅ org.apache.pulsar.common.api.raw.RawMessageImplTest +``` +✅ testGetProperties +``` +### ✅ org.apache.pulsar.common.compression.CommandsTest +``` +✅ testChecksumSendCommand +``` +### ✅ org.apache.pulsar.common.compression.CompressorCodecBackwardCompatTest +``` +✅ testCompressDecompress +✅ testCompressDecompress +✅ testCompressDecompress +✅ testCompressDecompress +✅ testCompressDecompress +✅ testCompressDecompress +``` +### ✅ org.apache.pulsar.common.compression.CompressorCodecTest +``` +✅ testCompressDecompress +✅ testMultpileUsages +✅ testMultpileUsages +✅ testCompressDecompress +✅ testMultpileUsages +✅ testCompressDecompress +✅ testMultpileUsages +✅ testCompressDecompress +✅ testDecompressFromSampleBuffer +✅ testDecompressReadonlyByteBuf +✅ testDecompressReadonlyByteBuf +✅ testCodecProvider +✅ testEmptyInput +✅ testEmptyInput +✅ testCompressDecompress +✅ testCodecProvider +✅ testDecompressFromSampleBuffer +✅ testMultpileUsages +✅ testCodecProvider +✅ testEmptyInput +✅ testDecompressReadonlyByteBuf +✅ testCompressDecompress +✅ testDecompressReadonlyByteBuf +✅ testCompressDecompress +✅ testCompressDecompress +✅ testMultpileUsages +✅ testEmptyInput +✅ testDecompressReadonlyByteBuf +✅ testDecompressFromSampleBuffer +✅ testDecompressFromSampleBuffer +✅ testDecompressFromSampleBuffer +✅ testDecompressReadonlyByteBuf +✅ testDecompressReadonlyByteBuf +✅ testMultpileUsages +✅ testCompressDecompress +✅ testCodecProvider +✅ testMultpileUsages +✅ testCompressDecompress +✅ testMultpileUsages +✅ testDecompressReadonlyByteBuf +✅ testEmptyInput +✅ testCodecProvider +✅ testDecompressReadonlyByteBuf +✅ testDecompressReadonlyByteBuf +✅ testMultpileUsages +``` +### ✅ org.apache.pulsar.common.compression.Crc32cChecksumTest +``` +✅ testCrc32cHardware +✅ testCrc32cDirectMemoryHardware +✅ testCrc32c +✅ testCrc32cSoftware +✅ testCrc32cIncremental +✅ testCrc32cIncrementalUsingProvider +``` +### ✅ org.apache.pulsar.common.lookup.data.LookupDataTest +``` +✅ testLoadReportSerialization +✅ testUrlEncoder +✅ serializeToJsonTest +✅ withConstructor +``` +### ✅ org.apache.pulsar.common.naming.MetadataTests +``` +✅ testInvalidMetadata +✅ testValidMetadata +``` +### ✅ org.apache.pulsar.common.naming.NamespaceBundlesTest +``` +✅ testConstructor +✅ testSplitBundleInTwo +✅ testsplitBundles +✅ testFindBundle +✅ testSplitBundleByFixBoundary +``` +### ✅ org.apache.pulsar.common.naming.NamespaceBundleTest +``` +✅ testIncludes +✅ testGetBundle +✅ testCompareTo +✅ testConstructor +✅ testToString +✅ testEquals +``` +### ✅ org.apache.pulsar.common.naming.NamespaceNameTest +``` +✅ namespace +✅ testNewScheme +``` +### ✅ org.apache.pulsar.common.naming.ServiceConfigurationTest +``` +✅ testOptionalSettingPresent +✅ testOptionalSettingEmpty +✅ testInit +✅ testInitFailure ``` -### ✔️ org.apache.pulsar.common.naming.TopicNameTest +### ✅ org.apache.pulsar.common.naming.TopicNameTest ``` -✔️ testShortTopicName -✔️ topic -✔️ testTopicNameWithoutCluster -✔️ testDecodeEncode +✅ testShortTopicName +✅ topic +✅ testTopicNameWithoutCluster +✅ testDecodeEncode ``` -### ✔️ org.apache.pulsar.common.net.ServiceURITest +### ✅ org.apache.pulsar.common.net.ServiceURITest ``` -✔️ testEmptyServiceUriString -✔️ testMultipleHostsSemiColon -✔️ testInvalidServiceUris -✔️ testMultipleHostsWithoutHttpPorts -✔️ testRootPath -✔️ testMultipleHostsMixedPorts -✔️ testMultipleHostsWithoutPulsarTlsPorts -✔️ testUserInfoWithMultipleHosts -✔️ testMultipleHostsComma -✔️ testMultipleHostsMixed -✔️ testUserInfo -✔️ testIpv6UriWithoutPulsarPort -✔️ testMultiIpv6Uri -✔️ testMultiIpv6UriWithoutPulsarPort -✔️ testEmptyPath -✔️ testNullServiceUriString -✔️ testNullServiceUriInstance -✔️ testMissingServiceName -✔️ testMultipleHostsWithoutHttpsPorts -✔️ testMultipleHostsWithoutPulsarPorts -✔️ testIpv6Uri +✅ testEmptyServiceUriString +✅ testMultipleHostsSemiColon +✅ testInvalidServiceUris +✅ testMultipleHostsWithoutHttpPorts +✅ testRootPath +✅ testMultipleHostsMixedPorts +✅ testMultipleHostsWithoutPulsarTlsPorts +✅ testUserInfoWithMultipleHosts +✅ testMultipleHostsComma +✅ testMultipleHostsMixed +✅ testUserInfo +✅ testIpv6UriWithoutPulsarPort +✅ testMultiIpv6Uri +✅ testMultiIpv6UriWithoutPulsarPort +✅ testEmptyPath +✅ testNullServiceUriString +✅ testNullServiceUriInstance +✅ testMissingServiceName +✅ testMultipleHostsWithoutHttpsPorts +✅ testMultipleHostsWithoutPulsarPorts +✅ testIpv6Uri ``` -### ✔️ org.apache.pulsar.common.policies.data.AutoFailoverPolicyDataTest +### ✅ org.apache.pulsar.common.policies.data.AutoFailoverPolicyDataTest ``` -✔️ testAutoFailoverPolicyData +✅ testAutoFailoverPolicyData ``` -### ✔️ org.apache.pulsar.common.policies.data.AutoFailoverPolicyTypeTest +### ✅ org.apache.pulsar.common.policies.data.AutoFailoverPolicyTypeTest ``` -✔️ testAutoFailoverPolicyType +✅ testAutoFailoverPolicyType ``` -### ✔️ org.apache.pulsar.common.policies.data.AutoTopicCreationOverrideTest +### ✅ org.apache.pulsar.common.policies.data.AutoTopicCreationOverrideTest ``` -✔️ testInvalidTopicType -✔️ testNumPartitionsTooLow -✔️ testNumPartitionsNotSet -✔️ testValidOverrideNonPartitioned -✔️ testNumPartitionsOnNonPartitioned -✔️ testValidOverridePartitioned +✅ testInvalidTopicType +✅ testNumPartitionsTooLow +✅ testNumPartitionsNotSet +✅ testValidOverrideNonPartitioned +✅ testNumPartitionsOnNonPartitioned +✅ testValidOverridePartitioned ``` -### ✔️ org.apache.pulsar.common.policies.data.BacklogQuotaTest +### ✅ org.apache.pulsar.common.policies.data.BacklogQuotaTest ``` -✔️ testBacklogQuotaIdentity +✅ testBacklogQuotaIdentity ``` -### ✔️ org.apache.pulsar.common.policies.data.ClusterDataTest +### ✅ org.apache.pulsar.common.policies.data.ClusterDataTest ``` -✔️ simple +✅ simple ``` -### ✔️ org.apache.pulsar.common.policies.data.ConsumerStatsTest +### ✅ org.apache.pulsar.common.policies.data.ConsumerStatsTest ``` -✔️ testConsumerStats +✅ testConsumerStats ``` -### ✔️ org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfigTest +### ✅ org.apache.pulsar.common.policies.data.EnsemblePlacementPolicyConfigTest ``` -✔️ testDecodeFailed -✔️ testEncodeDecodeSuccessfully +✅ testDecodeFailed +✅ testEncodeDecodeSuccessfully ``` -### ✔️ org.apache.pulsar.common.policies.data.LocalPolicesTest +### ✅ org.apache.pulsar.common.policies.data.LocalPolicesTest ``` -✔️ testLocalPolices +✅ testLocalPolices ``` -### ✔️ org.apache.pulsar.common.policies.data.NamespaceIsolationDataTest +### ✅ org.apache.pulsar.common.policies.data.NamespaceIsolationDataTest ``` -✔️ testNamespaceIsolationData +✅ testNamespaceIsolationData ``` -### ✔️ org.apache.pulsar.common.policies.data.NamespaceOwnershipStatusTest +### ✅ org.apache.pulsar.common.policies.data.NamespaceOwnershipStatusTest ``` -✔️ testSerialization +✅ testSerialization ``` -### ✔️ org.apache.pulsar.common.policies.data.OffloadPoliciesTest +### ✅ org.apache.pulsar.common.policies.data.OffloadPoliciesTest ``` -✔️ testGcsConfiguration -✔️ mergeTest -✔️ compatibleWithConfigFileTest -✔️ testCreateByProperties -✔️ testS3Configuration -✔️ oldPoliciesCompatibleTest +✅ testGcsConfiguration +✅ mergeTest +✅ compatibleWithConfigFileTest +✅ testCreateByProperties +✅ testS3Configuration +✅ oldPoliciesCompatibleTest ``` -### ✔️ org.apache.pulsar.common.policies.data.PartitionedTopicStatsTest +### ✅ org.apache.pulsar.common.policies.data.PartitionedTopicStatsTest ``` -✔️ testPartitionedTopicStats +✅ testPartitionedTopicStats ``` -### ✔️ org.apache.pulsar.common.policies.data.PersistencePoliciesTest +### ✅ org.apache.pulsar.common.policies.data.PersistencePoliciesTest ``` -✔️ testPersistencePolicies +✅ testPersistencePolicies ``` -### ✔️ org.apache.pulsar.common.policies.data.PersistentOfflineTopicStatsTest +### ✅ org.apache.pulsar.common.policies.data.PersistentOfflineTopicStatsTest ``` -✔️ testPersistentOfflineTopicStats +✅ testPersistentOfflineTopicStats ``` -### ✔️ org.apache.pulsar.common.policies.data.PersistentTopicStatsTest +### ✅ org.apache.pulsar.common.policies.data.PersistentTopicStatsTest ``` -✔️ testPersistentTopicStatsAggregation -✔️ testPersistentTopicStats +✅ testPersistentTopicStatsAggregation +✅ testPersistentTopicStats ``` -### ✔️ org.apache.pulsar.common.policies.data.PoliciesDataTest +### ✅ org.apache.pulsar.common.policies.data.PoliciesDataTest ``` -✔️ propertyAdmin -✔️ policies -✔️ bundlesData -✔️ bundlesPolicies +✅ propertyAdmin +✅ policies +✅ bundlesData +✅ bundlesPolicies ``` -### ✔️ org.apache.pulsar.common.policies.data.PublisherStatsTest +### ✅ org.apache.pulsar.common.policies.data.PublisherStatsTest ``` -✔️ testPublisherStats -✔️ testPublisherStatsAggregation +✅ testPublisherStats +✅ testPublisherStatsAggregation ``` -### ✔️ org.apache.pulsar.common.policies.data.ReplicatorStatsTest +### ✅ org.apache.pulsar.common.policies.data.ReplicatorStatsTest ``` -✔️ testReplicatorStatsAdd -✔️ testReplicatorStatsNull +✅ testReplicatorStatsAdd +✅ testReplicatorStatsNull ``` -### ✔️ org.apache.pulsar.common.policies.data.ResourceQuotaTest +### ✅ org.apache.pulsar.common.policies.data.ResourceQuotaTest ``` -✔️ testResourceQuotaDefault -✔️ testResourceQuotaEqual +✅ testResourceQuotaDefault +✅ testResourceQuotaEqual ``` -### ✔️ org.apache.pulsar.common.policies.data.RetentionPolicesTest +### ✅ org.apache.pulsar.common.policies.data.RetentionPolicesTest ``` -✔️ testRetentionPolices +✅ testRetentionPolices ``` -### ✔️ org.apache.pulsar.common.policies.impl.AutoFailoverPolicyFactoryTest +### ✅ org.apache.pulsar.common.policies.impl.AutoFailoverPolicyFactoryTest ``` -✔️ testAutoFailoverPolicyFactory +✅ testAutoFailoverPolicyFactory ``` -### ✔️ org.apache.pulsar.common.policies.impl.MinAvailablePolicyTest +### ✅ org.apache.pulsar.common.policies.impl.MinAvailablePolicyTest ``` -✔️ testMinAvailablePolicty +✅ testMinAvailablePolicty ``` -### ✔️ org.apache.pulsar.common.policies.impl.NamespaceIsolationPoliciesTest +### ✅ org.apache.pulsar.common.policies.impl.NamespaceIsolationPoliciesTest ``` -✔️ testBrokerAssignment -✔️ testGetNamespaceIsolationPolicyByName -✔️ testDeletePolicy -✔️ testSetPolicy -✔️ testJsonSerialization -✔️ testDefaultConstructor -✔️ testGetNamespaceIsolationPolicyByNamespace +✅ testBrokerAssignment +✅ testGetNamespaceIsolationPolicyByName +✅ testDeletePolicy +✅ testSetPolicy +✅ testJsonSerialization +✅ testDefaultConstructor +✅ testGetNamespaceIsolationPolicyByNamespace ``` -### ✔️ org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImplTest +### ✅ org.apache.pulsar.common.policies.impl.NamespaceIsolationPolicyImplTest ``` -✔️ testFindBrokers -✔️ testGetSecondaryBrokers -✔️ testShouldFailover -✔️ testGetPrimaryBrokers -✔️ testGetAvailablePrimaryBrokers -✔️ testConstructor -✔️ testIsPrimaryOrSecondaryBroker +✅ testFindBrokers +✅ testGetSecondaryBrokers +✅ testShouldFailover +✅ testGetPrimaryBrokers +✅ testGetAvailablePrimaryBrokers +✅ testConstructor +✅ testIsPrimaryOrSecondaryBroker ``` -### ✔️ org.apache.pulsar.common.protocol.ByteBufPairTest +### ✅ org.apache.pulsar.common.protocol.ByteBufPairTest ``` -✔️ testEncoder -✔️ testDoubleByteBuf +✅ testEncoder +✅ testDoubleByteBuf ``` -### ✔️ org.apache.pulsar.common.protocol.CommandUtilsTests +### ✅ org.apache.pulsar.common.protocol.CommandUtilsTests ``` -✔️ testSkipBrokerEntryMetadata -✔️ testPeekBrokerEntryMetadata -✔️ testParseBrokerEntryMetadata -✔️ testMetadataFromCommandSubscribe -✔️ testMetadataFromCommandProducer -✔️ testAddBrokerEntryMetadata -✔️ testByteBufComposite +✅ testSkipBrokerEntryMetadata +✅ testPeekBrokerEntryMetadata +✅ testParseBrokerEntryMetadata +✅ testMetadataFromCommandSubscribe +✅ testMetadataFromCommandProducer +✅ testAddBrokerEntryMetadata +✅ testByteBufComposite ``` -### ✔️ org.apache.pulsar.common.protocol.MarkersTest +### ✅ org.apache.pulsar.common.protocol.MarkersTest ``` -✔️ testSnapshot -✔️ testTxnAbortMarker -✔️ testUpdate -✔️ testTxnCommitMarker -✔️ testSnapshotRequest -✔️ testSnapshotResponse +✅ testSnapshot +✅ testTxnAbortMarker +✅ testUpdate +✅ testTxnCommitMarker +✅ testSnapshotRequest +✅ testSnapshotResponse ``` -### ✔️ org.apache.pulsar.common.protocol.PulsarDecoderTest +### ✅ org.apache.pulsar.common.protocol.PulsarDecoderTest ``` -✔️ testChannelRead +✅ testChannelRead ``` -### ✔️ org.apache.pulsar.common.stats.JvmDefaultGCMetricsLoggerTest +### ✅ org.apache.pulsar.common.stats.JvmDefaultGCMetricsLoggerTest ``` -✔️ testInvokeJVMInternals +✅ testInvokeJVMInternals ``` -### ✔️ org.apache.pulsar.common.util.collections.BitSetRecyclableRecyclableTest +### ✅ org.apache.pulsar.common.util.collections.BitSetRecyclableRecyclableTest ``` -✔️ testResetWords -✔️ testRecycle +✅ testResetWords +✅ testRecycle ``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentBitSetRecyclableTest +### ✅ org.apache.pulsar.common.util.collections.ConcurrentBitSetRecyclableTest ``` -✔️ testRecycle -✔️ testGenerateByBitSet -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentLongHashMapTest -``` -✔️ testRehashingWithDeletes -✔️ concurrentInsertionsAndReads -✔️ testRemove -✔️ testRehashing -✔️ simpleInsertions -✔️ testComputeIfAbsent -✔️ testConstructor -✔️ testPutIfAbsent -✔️ testIteration -✔️ testHashConflictWithDeletion -✔️ concurrentInsertions -✔️ stressConcurrentInsertionsAndReads -✔️ testNegativeUsedBucketCount -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentLongPairSetTest -``` -✔️ concurrentInsertionsAndReads -✔️ testEqualsObjects -✔️ testIfRemoval -✔️ testRehashing -✔️ testToString -✔️ testRemove -✔️ testItems -✔️ testRehashingWithDeletes -✔️ testHashConflictWithDeletion -✔️ testIteration -✔️ simpleInsertions -✔️ testRehashingRemoval -✔️ testRemoval -✔️ testConstructor -✔️ concurrentInsertions -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentOpenHashMapTest -``` -✔️ testRemove -✔️ simpleInsertions -✔️ testPutIfAbsent -✔️ concurrentInsertions -✔️ testHashConflictWithDeletion -✔️ testRehashingWithDeletes -✔️ testComputeIfAbsent -✔️ testRehashing -✔️ testIteration -✔️ testEqualsKeys -✔️ concurrentInsertionsAndReads -✔️ testConstructor -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentOpenHashSetTest -``` -✔️ concurrentInsertions -✔️ testRehashing -✔️ testRemoval -✔️ testEqualsObjects -✔️ testHashConflictWithDeletion -✔️ testConstructor -✔️ concurrentInsertionsAndReads -✔️ testIteration -✔️ simpleInsertions -✔️ testRehashingWithDeletes -✔️ testRemove -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentOpenLongPairRangeSetTest -``` -✔️ testAddForDifferentKey -✔️ testToString -✔️ testCacheFlagConflict -✔️ testDeleteWithLeastMost -✔️ testDeleteForDifferentKey -✔️ testLastRange -✔️ testAddCompareCompareWithGuava -✔️ testSpanWithGuava -✔️ testDeleteCompareWithGuava -✔️ testFirstRange -✔️ testAddForSameKey -✔️ testDeleteWithAtMost -✔️ testRangeContaining -``` -### ✔️ org.apache.pulsar.common.util.collections.ConcurrentSortedLongPairSetTest -``` -✔️ concurrentInsertions -✔️ testIfRemoval -✔️ testRemoval -✔️ testRemove -✔️ testItems -✔️ testEqualsObjects -✔️ simpleInsertions -✔️ testIteration -✔️ testToString -``` -### ✔️ org.apache.pulsar.common.util.collections.FieldParserTest -``` -✔️ testUpdateObject -✔️ testConversion -``` -### ✔️ org.apache.pulsar.common.util.collections.GrowableArrayBlockingQueueTest -``` -✔️ removeTest -✔️ growArray -✔️ pollTimeout -✔️ simple -✔️ pollTimeout2 -✔️ blockingTake -``` -### ✔️ org.apache.pulsar.common.util.collections.GrowablePriorityLongPairQueueTest -``` -✔️ testItems -✔️ testRemove -✔️ testExpandQueue -✔️ testInsertAndRemove -✔️ testEqualsObjects -✔️ testExpandRemoval -✔️ testIteration -✔️ simpleInsertions -✔️ concurrentInsertions -✔️ testConstructor -✔️ testSetWithDuplicateInsert -✔️ testExpandWithDeletes -✔️ concurrentInsertionsAndReads -✔️ testRemoval -✔️ testIfRemoval -``` -### ✔️ org.apache.pulsar.common.util.collections.TripleLongPriorityQueueTest -``` -✔️ testQueue -✔️ testCheckForEmpty -✔️ testCompareWithSamePrefix +✅ testRecycle +✅ testGenerateByBitSet +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentLongHashMapTest +``` +✅ testRehashingWithDeletes +✅ concurrentInsertionsAndReads +✅ testRemove +✅ testRehashing +✅ simpleInsertions +✅ testComputeIfAbsent +✅ testConstructor +✅ testPutIfAbsent +✅ testIteration +✅ testHashConflictWithDeletion +✅ concurrentInsertions +✅ stressConcurrentInsertionsAndReads +✅ testNegativeUsedBucketCount +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentLongPairSetTest +``` +✅ concurrentInsertionsAndReads +✅ testEqualsObjects +✅ testIfRemoval +✅ testRehashing +✅ testToString +✅ testRemove +✅ testItems +✅ testRehashingWithDeletes +✅ testHashConflictWithDeletion +✅ testIteration +✅ simpleInsertions +✅ testRehashingRemoval +✅ testRemoval +✅ testConstructor +✅ concurrentInsertions +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentOpenHashMapTest +``` +✅ testRemove +✅ simpleInsertions +✅ testPutIfAbsent +✅ concurrentInsertions +✅ testHashConflictWithDeletion +✅ testRehashingWithDeletes +✅ testComputeIfAbsent +✅ testRehashing +✅ testIteration +✅ testEqualsKeys +✅ concurrentInsertionsAndReads +✅ testConstructor +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentOpenHashSetTest +``` +✅ concurrentInsertions +✅ testRehashing +✅ testRemoval +✅ testEqualsObjects +✅ testHashConflictWithDeletion +✅ testConstructor +✅ concurrentInsertionsAndReads +✅ testIteration +✅ simpleInsertions +✅ testRehashingWithDeletes +✅ testRemove +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentOpenLongPairRangeSetTest +``` +✅ testAddForDifferentKey +✅ testToString +✅ testCacheFlagConflict +✅ testDeleteWithLeastMost +✅ testDeleteForDifferentKey +✅ testLastRange +✅ testAddCompareCompareWithGuava +✅ testSpanWithGuava +✅ testDeleteCompareWithGuava +✅ testFirstRange +✅ testAddForSameKey +✅ testDeleteWithAtMost +✅ testRangeContaining +``` +### ✅ org.apache.pulsar.common.util.collections.ConcurrentSortedLongPairSetTest +``` +✅ concurrentInsertions +✅ testIfRemoval +✅ testRemoval +✅ testRemove +✅ testItems +✅ testEqualsObjects +✅ simpleInsertions +✅ testIteration +✅ testToString +``` +### ✅ org.apache.pulsar.common.util.collections.FieldParserTest +``` +✅ testUpdateObject +✅ testConversion +``` +### ✅ org.apache.pulsar.common.util.collections.GrowableArrayBlockingQueueTest +``` +✅ removeTest +✅ growArray +✅ pollTimeout +✅ simple +✅ pollTimeout2 +✅ blockingTake +``` +### ✅ org.apache.pulsar.common.util.collections.GrowablePriorityLongPairQueueTest +``` +✅ testItems +✅ testRemove +✅ testExpandQueue +✅ testInsertAndRemove +✅ testEqualsObjects +✅ testExpandRemoval +✅ testIteration +✅ simpleInsertions +✅ concurrentInsertions +✅ testConstructor +✅ testSetWithDuplicateInsert +✅ testExpandWithDeletes +✅ concurrentInsertionsAndReads +✅ testRemoval +✅ testIfRemoval +``` +### ✅ org.apache.pulsar.common.util.collections.TripleLongPriorityQueueTest +``` +✅ testQueue +✅ testCheckForEmpty +✅ testCompareWithSamePrefix ``` -### ✔️ org.apache.pulsar.common.util.FieldParserTest +### ✅ org.apache.pulsar.common.util.FieldParserTest ``` -✔️ testMap +✅ testMap ``` -### ✔️ org.apache.pulsar.common.util.FileModifiedTimeUpdaterTest +### ✅ org.apache.pulsar.common.util.FileModifiedTimeUpdaterTest ``` -✔️ testFileNotModified -✔️ testFileModified -✔️ testFileModified -✔️ testFileNotModified -✔️ testFileModified -✔️ testFileNotModified +✅ testFileNotModified +✅ testFileModified +✅ testFileModified +✅ testFileNotModified +✅ testFileModified +✅ testFileNotModified ``` -### ✔️ org.apache.pulsar.common.util.netty.ChannelFuturesTest +### ✅ org.apache.pulsar.common.util.netty.ChannelFuturesTest ``` -✔️ toCompletableFuture_shouldCompleteExceptionally_channelFutureCompletedAfter -✔️ toCompletableFuture_shouldCompleteSuccessfully_channelFutureCompletedAfter -✔️ toCompletableFuture_shouldCompleteSuccessfully_channelFutureCompletedBefore -✔️ toCompletableFuture_shouldCompleteExceptionally_channelFutureCompletedBefore -✔️ toCompletableFuture_shouldRequireNonNullArgument +✅ toCompletableFuture_shouldCompleteExceptionally_channelFutureCompletedAfter +✅ toCompletableFuture_shouldCompleteSuccessfully_channelFutureCompletedAfter +✅ toCompletableFuture_shouldCompleteSuccessfully_channelFutureCompletedBefore +✅ toCompletableFuture_shouldCompleteExceptionally_channelFutureCompletedBefore +✅ toCompletableFuture_shouldRequireNonNullArgument ``` -### ✔️ org.apache.pulsar.common.util.RateLimiterTest +### ✅ org.apache.pulsar.common.util.RateLimiterTest ``` -✔️ testMultipleTryAcquire -✔️ testRateLimiterWithPermitUpdater -✔️ testTryAcquire -✔️ testTryAcquireNoPermits -✔️ testClose -✔️ testResetRate -✔️ testMultipleAcquire -✔️ testAcquire -✔️ testInvalidRenewTime -✔️ testRateLimiterWithFunction -✔️ testAcquireBlock +✅ testMultipleTryAcquire +✅ testRateLimiterWithPermitUpdater +✅ testTryAcquire +✅ testTryAcquireNoPermits +✅ testClose +✅ testResetRate +✅ testMultipleAcquire +✅ testAcquire +✅ testInvalidRenewTime +✅ testRateLimiterWithFunction +✅ testAcquireBlock ``` -### ✔️ org.apache.pulsar.common.util.ReflectionsTest +### ✅ org.apache.pulsar.common.util.ReflectionsTest ``` -✔️ testCreateInstanceNoNoArgConstructor -✔️ testCreateInstanceConstructorThrowsException -✔️ testCreateInstanceAbstractClass -✔️ testCreateTypedInstanceUnassignableClass -✔️ testCreateInstanceClassNotFound -✔️ testCreateTypedInstanceConstructorThrowsException -✔️ testClassExists -✔️ testCreateTypedInstanceAbstractClass -✔️ testCreateTypedInstanceClassNotFound -✔️ testCreateTypedInstanceNoNoArgConstructor -✔️ testLoadClass -✔️ testClassInJarImplementsIface +✅ testCreateInstanceNoNoArgConstructor +✅ testCreateInstanceConstructorThrowsException +✅ testCreateInstanceAbstractClass +✅ testCreateTypedInstanceUnassignableClass +✅ testCreateInstanceClassNotFound +✅ testCreateTypedInstanceConstructorThrowsException +✅ testClassExists +✅ testCreateTypedInstanceAbstractClass +✅ testCreateTypedInstanceClassNotFound +✅ testCreateTypedInstanceNoNoArgConstructor +✅ testLoadClass +✅ testClassInJarImplementsIface ``` -### ✔️ org.apache.pulsar.common.util.RelativeTimeUtilTest +### ✅ org.apache.pulsar.common.util.RelativeTimeUtilTest ``` -✔️ testParseRelativeTime +✅ testParseRelativeTime ``` -### ✔️ org.apache.pulsar.discovery.service.web.DiscoveryServiceWebTest +### ✅ org.apache.pulsar.discovery.service.web.DiscoveryServiceWebTest ``` -✔️ testRedirectUrlWithServerStarted +✅ testRedirectUrlWithServerStarted ``` -### ✔️ org.apache.pulsar.functions.worker.PulsarFunctionE2ESecurityTest +### ✅ org.apache.pulsar.functions.worker.PulsarFunctionE2ESecurityTest ``` -✔️ testAuthorizationWithAnonymousUser -✔️ testAuthorization +✅ testAuthorizationWithAnonymousUser +✅ testAuthorization ``` -### ✔️ org.apache.pulsar.functions.worker.PulsarFunctionPublishTest +### ✅ org.apache.pulsar.functions.worker.PulsarFunctionPublishTest ``` -✔️ testPulsarFunctionState -✔️ testMultipleAddress -✔️ testPulsarFunctionBKCleanup +✅ testPulsarFunctionState +✅ testMultipleAddress +✅ testPulsarFunctionBKCleanup ``` -### ✔️ org.apache.pulsar.functions.worker.PulsarFunctionTlsTest +### ✅ org.apache.pulsar.functions.worker.PulsarFunctionTlsTest ``` -✔️ testFunctionsCreation +✅ testFunctionsCreation ``` -### ✔️ org.apache.pulsar.io.PulsarFunctionTlsTest +### ✅ org.apache.pulsar.io.PulsarFunctionTlsTest ``` -✔️ testAuthorization +✅ testAuthorization ``` -### ✔️ org.apache.pulsar.proxy.server.AdminProxyHandlerTest +### ✅ org.apache.pulsar.proxy.server.AdminProxyHandlerTest ``` -✔️ replayableProxyContentProviderTest +✅ replayableProxyContentProviderTest ``` -### ✔️ org.apache.pulsar.proxy.server.AuthedAdminProxyHandlerTest +### ✅ org.apache.pulsar.proxy.server.AuthedAdminProxyHandlerTest ``` -✔️ testAuthenticatedProxyAsNonAdmin +✅ testAuthenticatedProxyAsNonAdmin ``` -### ✔️ org.apache.pulsar.proxy.server.FunctionWorkerRoutingTest +### ✅ org.apache.pulsar.proxy.server.FunctionWorkerRoutingTest ``` -✔️ testFunctionWorkerRedirect +✅ testFunctionWorkerRedirect ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyAdditionalServletTest +### ✅ org.apache.pulsar.proxy.server.ProxyAdditionalServletTest ``` -✔️ test +✅ test ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyAuthenticatedProducerConsumerTest +### ✅ org.apache.pulsar.proxy.server.ProxyAuthenticatedProducerConsumerTest ``` -✔️ testTlsSyncProducerAndConsumer +✅ testTlsSyncProducerAndConsumer ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyAuthenticationTest +### ✅ org.apache.pulsar.proxy.server.ProxyAuthenticationTest ``` -✔️ testAuthentication +✅ testAuthentication ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyConnectionThrottlingTest +### ✅ org.apache.pulsar.proxy.server.ProxyConnectionThrottlingTest ``` -✔️ testInboundConnection +✅ testInboundConnection ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyEnableHAProxyProtocolTest +### ✅ org.apache.pulsar.proxy.server.ProxyEnableHAProxyProtocolTest ``` -✔️ testSimpleProduceAndConsume +✅ testSimpleProduceAndConsume ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyForwardAuthDataTest +### ✅ org.apache.pulsar.proxy.server.ProxyForwardAuthDataTest ``` -✔️ testForwardAuthData +✅ testForwardAuthData ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyIsAHttpProxyTest +### ✅ org.apache.pulsar.proxy.server.ProxyIsAHttpProxyTest ``` -✔️ testProxyToEndsInSlash -✔️ testStreaming -✔️ testLongPath -✔️ testLongPathInProxyTo -✔️ testPathEndsInSlash -✔️ testPathNotSpecified -✔️ testTryingToUseExistingPath -✔️ testMultipleRedirect -✔️ testSingleRedirect -✔️ testRedirectNotSpecified +✅ testProxyToEndsInSlash +✅ testStreaming +✅ testLongPath +✅ testLongPathInProxyTo +✅ testPathEndsInSlash +✅ testPathNotSpecified +✅ testTryingToUseExistingPath +✅ testMultipleRedirect +✅ testSingleRedirect +✅ testRedirectNotSpecified ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithAuth +### ✅ org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithAuth ``` -✔️ testProducerFailed -✔️ testPartitions -✔️ testProducer +✅ testProducerFailed +✅ testPartitions +✅ testProducer ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithoutAuth +### ✅ org.apache.pulsar.proxy.server.ProxyKeyStoreTlsTestWithoutAuth ``` -✔️ testPartitions -✔️ testProducerFailed -✔️ testProducer +✅ testPartitions +✅ testProducerFailed +✅ testProducer ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyLookupThrottlingTest +### ✅ org.apache.pulsar.proxy.server.ProxyLookupThrottlingTest ``` -✔️ testLookup +✅ testLookup ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyParserTest +### ✅ org.apache.pulsar.proxy.server.ProxyParserTest ``` -✔️ testRegexSubscription -✔️ testProducerConsumer -✔️ testProducer -✔️ testPartitions -✔️ testProtocolVersionAdvertisement +✅ testRegexSubscription +✅ testProducerConsumer +✅ testProducer +✅ testPartitions +✅ testProtocolVersionAdvertisement ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyRolesEnforcementTest +### ✅ org.apache.pulsar.proxy.server.ProxyRolesEnforcementTest ``` -✔️ testIncorrectRoles +✅ testIncorrectRoles ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyStatsTest +### ✅ org.apache.pulsar.proxy.server.ProxyStatsTest ``` -✔️ testChangeLogLevel -✔️ testConnectionsStats -✔️ testTopicStats +✅ testChangeLogLevel +✅ testConnectionsStats +✅ testTopicStats ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyTest +### ✅ org.apache.pulsar.proxy.server.ProxyTest ``` -✔️ testPartitions -✔️ testRegexSubscription -✔️ testProtocolVersionAdvertisement -✔️ testGetSchema -✔️ testProducer -✔️ testProducerConsumer +✅ testPartitions +✅ testRegexSubscription +✅ testProtocolVersionAdvertisement +✅ testGetSchema +✅ testProducer +✅ testProducerConsumer ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyTlsTest +### ✅ org.apache.pulsar.proxy.server.ProxyTlsTest ``` -✔️ testProducer -✔️ testPartitions +✅ testProducer +✅ testPartitions ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyTlsTestWithAuth +### ✅ org.apache.pulsar.proxy.server.ProxyTlsTestWithAuth ``` -✔️ testServiceStartup +✅ testServiceStartup ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyWithAuthorizationNegTest +### ✅ org.apache.pulsar.proxy.server.ProxyWithAuthorizationNegTest ``` -✔️ testProxyAuthorization +✅ testProxyAuthorization ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyWithAuthorizationTest +### ✅ org.apache.pulsar.proxy.server.ProxyWithAuthorizationTest ``` -✔️ tlsCiphersAndProtocols -✔️ testTlsHostVerificationProxyToClient -✔️ tlsCiphersAndProtocols -✔️ testProxyAuthorization -✔️ tlsCiphersAndProtocols -✔️ testTlsHostVerificationProxyToBroker -✔️ tlsCiphersAndProtocols -✔️ tlsCiphersAndProtocols -✔️ tlsCiphersAndProtocols -✔️ testTlsHostVerificationProxyToBroker -✔️ tlsCiphersAndProtocols -✔️ testTlsHostVerificationProxyToClient -✔️ tlsCiphersAndProtocols +✅ tlsCiphersAndProtocols +✅ testTlsHostVerificationProxyToClient +✅ tlsCiphersAndProtocols +✅ testProxyAuthorization +✅ tlsCiphersAndProtocols +✅ testTlsHostVerificationProxyToBroker +✅ tlsCiphersAndProtocols +✅ tlsCiphersAndProtocols +✅ tlsCiphersAndProtocols +✅ testTlsHostVerificationProxyToBroker +✅ tlsCiphersAndProtocols +✅ testTlsHostVerificationProxyToClient +✅ tlsCiphersAndProtocols ``` -### ✔️ org.apache.pulsar.proxy.server.ProxyWithoutServiceDiscoveryTest +### ✅ org.apache.pulsar.proxy.server.ProxyWithoutServiceDiscoveryTest ``` -✔️ testDiscoveryService +✅ testDiscoveryService ``` -### ✔️ org.apache.pulsar.proxy.server.SuperUserAuthedAdminProxyHandlerTest +### ✅ org.apache.pulsar.proxy.server.SuperUserAuthedAdminProxyHandlerTest ``` -✔️ testAuthWithRandoCert -✔️ testAuthenticatedProxyAsAdmin -✔️ testAuthenticatedProxyAsNonAdmin +✅ testAuthWithRandoCert +✅ testAuthenticatedProxyAsAdmin +✅ testAuthenticatedProxyAsNonAdmin ``` -### ✔️ org.apache.pulsar.proxy.server.UnauthedAdminProxyHandlerTest +### ✅ org.apache.pulsar.proxy.server.UnauthedAdminProxyHandlerTest ``` -✔️ testUnauthenticatedProxy -✔️ testVipStatus +✅ testUnauthenticatedProxy +✅ testVipStatus ``` -### ✔️ org.apache.pulsar.PulsarBrokerStarterTest +### ✅ org.apache.pulsar.PulsarBrokerStarterTest ``` -✔️ testMainRunBookieNoConfig -✔️ testLoadConfigWithException -✔️ testMainWithNoArgument -✔️ testLoadBalancerConfig -✔️ testGlobalZooKeeperConfig -✔️ testMainRunBookieRecoveryNoConfig -✔️ testLoadConfig -✔️ testMainEnableRunBookieThroughBrokerConfig -✔️ testMainRunBookieAndAutoRecoveryNoConfig +✅ testMainRunBookieNoConfig +✅ testLoadConfigWithException +✅ testMainWithNoArgument +✅ testLoadBalancerConfig +✅ testGlobalZooKeeperConfig +✅ testMainRunBookieRecoveryNoConfig +✅ testLoadConfig +✅ testMainEnableRunBookieThroughBrokerConfig +✅ testMainRunBookieAndAutoRecoveryNoConfig ``` -### ✔️ org.apache.pulsar.schema.compatibility.SchemaCompatibilityCheckTest +### ✅ org.apache.pulsar.schema.compatibility.SchemaCompatibilityCheckTest ``` -✔️ testConsumerCompatibilityCheckCanReadLastTest -✔️ testConsumerWithNotCompatibilitySchema -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testConsumerCompatibilityCheckCanReadLastTest -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testSchemaComparison -✔️ testConsumerCompatibilityCheckCanReadLastTest -✔️ testConsumerCompatibilityReadAllCheckTest -✔️ testConsumerWithNotCompatibilitySchema -✔️ testIsAutoUpdateSchema -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testConsumerCompatibilityReadAllCheckTest -✔️ testIsAutoUpdateSchema -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testConsumerWithNotCompatibilitySchema -✔️ testIsAutoUpdateSchema -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testConsumerWithNotCompatibilitySchema -✔️ testProducerSendWithOldSchemaAndConsumerCanRead -✔️ testIsAutoUpdateSchema -✔️ testIsAutoUpdateSchema -✔️ testConsumerCompatibilityCheckCanReadLastTest -✔️ testIsAutoUpdateSchema +✅ testConsumerCompatibilityCheckCanReadLastTest +✅ testConsumerWithNotCompatibilitySchema +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testConsumerCompatibilityCheckCanReadLastTest +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testSchemaComparison +✅ testConsumerCompatibilityCheckCanReadLastTest +✅ testConsumerCompatibilityReadAllCheckTest +✅ testConsumerWithNotCompatibilitySchema +✅ testIsAutoUpdateSchema +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testConsumerCompatibilityReadAllCheckTest +✅ testIsAutoUpdateSchema +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testConsumerWithNotCompatibilitySchema +✅ testIsAutoUpdateSchema +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testConsumerWithNotCompatibilitySchema +✅ testProducerSendWithOldSchemaAndConsumerCanRead +✅ testIsAutoUpdateSchema +✅ testIsAutoUpdateSchema +✅ testConsumerCompatibilityCheckCanReadLastTest +✅ testIsAutoUpdateSchema ``` -### ✔️ org.apache.pulsar.schema.PartitionedTopicSchemaTest +### ✅ org.apache.pulsar.schema.PartitionedTopicSchemaTest ``` -✔️ test +✅ test ``` -### ✔️ org.apache.pulsar.schema.SchemaTest +### ✅ org.apache.pulsar.schema.SchemaTest ``` -✔️ testIsUsingAvroSchemaParser -✔️ testBytesSchemaDeserialize -✔️ testMultiTopicSetSchemaProvider +✅ testIsUsingAvroSchemaParser +✅ testBytesSchemaDeserialize +✅ testMultiTopicSetSchemaProvider ``` -### ✔️ org.apache.pulsar.stats.client.PulsarBrokerStatsClientTest +### ✅ org.apache.pulsar.stats.client.PulsarBrokerStatsClientTest ``` -✔️ testServiceException -✔️ testTopicInternalStats +✅ testServiceException +✅ testTopicInternalStats ``` -### ✔️ org.apache.pulsar.tests.EnumValuesDataProviderTest +### ✅ org.apache.pulsar.tests.EnumValuesDataProviderTest ``` -✔️ shouldFailIfEnumParameterIsMissing -✔️ testEnumValuesProvider -✔️ testEnumValuesProvider -✔️ shouldDetermineEnumValuesFromMethod -✔️ shouldContainAllEnumValues -✔️ testEnumValuesProvider +✅ shouldFailIfEnumParameterIsMissing +✅ testEnumValuesProvider +✅ testEnumValuesProvider +✅ shouldDetermineEnumValuesFromMethod +✅ shouldContainAllEnumValues +✅ testEnumValuesProvider ``` -### ✔️ org.apache.pulsar.tests.TestRetrySupportBeforeMethodRetryTest +### ✅ org.apache.pulsar.tests.TestRetrySupportBeforeMethodRetryTest ``` -✔️ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod -✖️ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod -✖️ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod -✖️ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod -✖️ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod +✅ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod +⚪ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod +⚪ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod +⚪ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod +⚪ shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod ``` -### ✔️ org.apache.pulsar.tests.TestRetrySupportRetryTest +### ✅ org.apache.pulsar.tests.TestRetrySupportRetryTest ``` -✖️ shouldCallSetupBeforeRetrying -✔️ shouldCallSetupBeforeRetrying -✖️ shouldCallSetupBeforeRetrying -✖️ shouldCallSetupBeforeRetrying -✖️ shouldCallSetupBeforeRetrying +⚪ shouldCallSetupBeforeRetrying +✅ shouldCallSetupBeforeRetrying +⚪ shouldCallSetupBeforeRetrying +⚪ shouldCallSetupBeforeRetrying +⚪ shouldCallSetupBeforeRetrying ``` -### ✔️ org.apache.pulsar.tests.TestRetrySupportSuccessTest +### ✅ org.apache.pulsar.tests.TestRetrySupportSuccessTest ``` -✔️ shouldCallSetupOnce1 -✔️ shouldCallSetupOnce3 -✔️ shouldCallSetupOnce2 +✅ shouldCallSetupOnce1 +✅ shouldCallSetupOnce3 +✅ shouldCallSetupOnce2 ``` -### ✔️ org.apache.pulsar.tests.ThreadDumpUtilTest +### ✅ org.apache.pulsar.tests.ThreadDumpUtilTest ``` -✔️ testHelp -✔️ testThreadDump +✅ testHelp +✅ testThreadDump ``` -### ✔️ org.apache.pulsar.utils.SimpleTextOutputStreamTest +### ✅ org.apache.pulsar.utils.SimpleTextOutputStreamTest ``` -✔️ testBooleanFormat -✔️ testDoubleFormat -✔️ testLongFormat -✔️ testString +✅ testBooleanFormat +✅ testDoubleFormat +✅ testLongFormat +✅ testString ``` -### ✔️ org.apache.pulsar.utils.StatsOutputStreamTest +### ✅ org.apache.pulsar.utils.StatsOutputStreamTest ``` -✔️ testLists -✔️ testNamedObjects -✔️ testNestedObjects -✔️ testNamedLists -✔️ testPairs -✔️ testObjects +✅ testLists +✅ testNamedObjects +✅ testNestedObjects +✅ testNamedLists +✅ testPairs +✅ testObjects ``` -### ✔️ org.apache.pulsar.websocket.proxy.ProxyAuthenticationTest +### ✅ org.apache.pulsar.websocket.proxy.ProxyAuthenticationTest ``` -✔️ unauthenticatedSocketTest -✔️ authenticatedSocketTest -✔️ statsTest -✔️ anonymousSocketTest +✅ unauthenticatedSocketTest +✅ authenticatedSocketTest +✅ statsTest +✅ anonymousSocketTest ``` -### ✔️ org.apache.pulsar.websocket.proxy.ProxyAuthorizationTest +### ✅ org.apache.pulsar.websocket.proxy.ProxyAuthorizationTest ``` -✔️ test +✅ test ``` -### ✔️ org.apache.pulsar.websocket.proxy.ProxyConfigurationTest +### ✅ org.apache.pulsar.websocket.proxy.ProxyConfigurationTest ``` -✔️ configTest -✔️ configTest +✅ configTest +✅ configTest ``` -### ✔️ org.apache.pulsar.websocket.proxy.ProxyPublishConsumeTlsTest +### ✅ org.apache.pulsar.websocket.proxy.ProxyPublishConsumeTlsTest ``` -✔️ socketTest +✅ socketTest ``` -### ✔️ org.apache.pulsar.websocket.proxy.ProxyPublishConsumeWithoutZKTest +### ✅ org.apache.pulsar.websocket.proxy.ProxyPublishConsumeWithoutZKTest ``` -✔️ socketTest +✅ socketTest ``` -### ✔️ org.apache.pulsar.websocket.proxy.v1.V1_ProxyAuthenticationTest +### ✅ org.apache.pulsar.websocket.proxy.v1.V1_ProxyAuthenticationTest ``` -✔️ anonymousSocketTest -✔️ authenticatedSocketTest -✔️ statsTest -✔️ unauthenticatedSocketTest +✅ anonymousSocketTest +✅ authenticatedSocketTest +✅ statsTest +✅ unauthenticatedSocketTest ``` \ No newline at end of file diff --git a/__tests__/__outputs__/python-xunit-pytest.md b/__tests__/__outputs__/python-xunit-pytest.md new file mode 100644 index 0000000..7b13e28 --- /dev/null +++ b/__tests__/__outputs__/python-xunit-pytest.md @@ -0,0 +1,26 @@ +![Tests failed](https://img.shields.io/badge/tests-6%20passed%2C%202%20failed%2C%202%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/python-xunit-pytest.xml](#user-content-r0)|6 ✅|2 ❌|2 ⚪|19ms| +## ❌ fixtures/python-xunit-pytest.xml +**10** tests were completed in **19ms** with **6** passed, **2** failed and **2** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[pytest](#user-content-r0s0)|6 ✅|2 ❌|2 ⚪|19ms| +### ❌ pytest +``` +tests.test_lib + ✅ test_always_pass + ✅ test_with_subtests + ✅ test_parameterized[param1] + ✅ test_parameterized[param2] + ⚪ test_always_skip + ❌ test_always_fail + assert False + ⚪ test_expected_failure + ❌ test_error + Exception: error + ✅ test_with_record_property +custom_classname + ✅ test_with_record_xml_attribute +``` \ No newline at end of file diff --git a/__tests__/__outputs__/python-xunit-unittest.md b/__tests__/__outputs__/python-xunit-unittest.md new file mode 100644 index 0000000..230d186 --- /dev/null +++ b/__tests__/__outputs__/python-xunit-unittest.md @@ -0,0 +1,23 @@ +![Tests failed](https://img.shields.io/badge/tests-4%20passed%2C%202%20failed%2C%202%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/python-xunit-unittest.xml](#user-content-r0)|4 ✅|2 ❌|2 ⚪|1ms| +## ❌ fixtures/python-xunit-unittest.xml +**8** tests were completed in **1ms** with **4** passed, **2** failed and **2** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[TestAcme-20251114214921](#user-content-r0s0)|4 ✅|2 ❌|2 ⚪|1ms| +### ❌ TestAcme-20251114214921 +``` +TestAcme + ✅ test_always_pass + ✅ test_parameterized_0_param1 + ✅ test_parameterized_1_param2 + ✅ test_with_subtests + ❌ test_always_fail + AssertionError: failed + ❌ test_error + Exception: error + ⚪ test_always_skip + ⚪ test_expected_failure +``` \ No newline at end of file diff --git a/__tests__/__outputs__/rspec-json.md b/__tests__/__outputs__/rspec-json.md new file mode 100644 index 0000000..d64cf44 --- /dev/null +++ b/__tests__/__outputs__/rspec-json.md @@ -0,0 +1,19 @@ +![Tests failed](https://img.shields.io/badge/tests-1%20passed%2C%201%20failed%2C%201%20skipped-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/rspec-json.json](#user-content-r0)|1 ✅|1 ❌|1 ⚪|0ms| +## ❌ fixtures/rspec-json.json +**3** tests were completed in **0ms** with **1** passed, **1** failed and **1** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[./spec/config/check_env_vars_spec.rb](#user-content-r0s0)|1 ✅|1 ❌|1 ⚪|0ms| +### ❌ ./spec/config/check_env_vars_spec.rb +``` +CheckEnvVars#call when all env vars are defined behaves like success load + ❌ CheckEnvVars#call when all env vars are defined behaves like success load fails in assertion + (#ActiveSupport::BroadcastLogger:0x00007f1007fedf58).debug("All config env vars exist") + expected: 0 times with arguments: ("All config env vars exist") + received: 1 time with arguments: ("All config env vars exist") + ✅ CheckEnvVars#call when all env vars are defined behaves like success load logs success message + ⚪ CheckEnvVars#call when all env vars are defined behaves like success load skips the test +``` \ No newline at end of file diff --git a/__tests__/__outputs__/silent-notes-test-results.md b/__tests__/__outputs__/silent-notes-test-results.md index de01928..e3abc49 100644 --- a/__tests__/__outputs__/silent-notes-test-results.md +++ b/__tests__/__outputs__/silent-notes-test-results.md @@ -1,136 +1,142 @@ ![Tests passed successfully](https://img.shields.io/badge/tests-67%20passed%2C%2012%20skipped-success) -## ✔️ fixtures/external/SilentNotes.trx +
Expand for details + +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/external/SilentNotes.trx](#user-content-r0)|67 ✅||12 ⚪|1s| +## ✅ fixtures/external/SilentNotes.trx **79** tests were completed in **1s** with **67** passed, **0** failed and **12** skipped. |Test suite|Passed|Failed|Skipped|Time| |:---|---:|---:|---:|---:| -|[VanillaCloudStorageClientTest.CloudStorageCredentialsTest](#r0s0)|6✔️|||30ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.DropboxCloudStorageClientTest](#r0s1)|2✔️||3✖️|101ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.FtpCloudStorageClientTest](#r0s2)|4✔️||3✖️|166ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.GmxCloudStorageClientTest](#r0s3)|2✔️|||7ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.GoogleCloudStorageClientTest](#r0s4)|1✔️||3✖️|40ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.OnedriveCloudStorageClientTest](#r0s5)|1✔️||3✖️|15ms| -|[VanillaCloudStorageClientTest.CloudStorageProviders.WebdavCloudStorageClientTest](#r0s6)|5✔️|||16ms| -|[VanillaCloudStorageClientTest.CloudStorageTokenTest](#r0s7)|9✔️|||0ms| -|[VanillaCloudStorageClientTest.OAuth2.AuthorizationResponseErrorTest](#r0s8)|3✔️|||3ms| -|[VanillaCloudStorageClientTest.OAuth2.OAuth2UtilsTest](#r0s9)|9✔️|||12ms| -|[VanillaCloudStorageClientTest.OAuth2CloudStorageClientTest](#r0s10)|5✔️|||13ms| -|[VanillaCloudStorageClientTest.SecureStringExtensionsTest](#r0s11)|7✔️|||0ms| -|[VanillaCloudStorageClientTest.SerializeableCloudStorageCredentialsTest](#r0s12)|13✔️|||43ms| -### ✔️ VanillaCloudStorageClientTest.CloudStorageCredentialsTest +|[VanillaCloudStorageClientTest.CloudStorageCredentialsTest](#user-content-r0s0)|6 ✅|||30ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.DropboxCloudStorageClientTest](#user-content-r0s1)|2 ✅||3 ⚪|101ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.FtpCloudStorageClientTest](#user-content-r0s2)|4 ✅||3 ⚪|166ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.GmxCloudStorageClientTest](#user-content-r0s3)|2 ✅|||7ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.GoogleCloudStorageClientTest](#user-content-r0s4)|1 ✅||3 ⚪|40ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.OnedriveCloudStorageClientTest](#user-content-r0s5)|1 ✅||3 ⚪|15ms| +|[VanillaCloudStorageClientTest.CloudStorageProviders.WebdavCloudStorageClientTest](#user-content-r0s6)|5 ✅|||16ms| +|[VanillaCloudStorageClientTest.CloudStorageTokenTest](#user-content-r0s7)|9 ✅|||0ms| +|[VanillaCloudStorageClientTest.OAuth2.AuthorizationResponseErrorTest](#user-content-r0s8)|3 ✅|||3ms| +|[VanillaCloudStorageClientTest.OAuth2.OAuth2UtilsTest](#user-content-r0s9)|9 ✅|||12ms| +|[VanillaCloudStorageClientTest.OAuth2CloudStorageClientTest](#user-content-r0s10)|5 ✅|||13ms| +|[VanillaCloudStorageClientTest.SecureStringExtensionsTest](#user-content-r0s11)|7 ✅|||0ms| +|[VanillaCloudStorageClientTest.SerializeableCloudStorageCredentialsTest](#user-content-r0s12)|13 ✅|||43ms| +### ✅ VanillaCloudStorageClientTest.CloudStorageCredentialsTest ``` -✔️ AreEqualWorksWithDifferentPassword -✔️ AreEqualWorksWithSameContent -✔️ CorrectlyConvertsSecureStringToString -✔️ CorrectlyConvertsStringToSecureString -✔️ ValidateAcceptsValidCredentials -✔️ ValidateRejectsInvalidCredentials +✅ AreEqualWorksWithDifferentPassword +✅ AreEqualWorksWithSameContent +✅ CorrectlyConvertsSecureStringToString +✅ CorrectlyConvertsStringToSecureString +✅ ValidateAcceptsValidCredentials +✅ ValidateRejectsInvalidCredentials ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.DropboxCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.DropboxCloudStorageClientTest ``` -✔️ FileLifecycleWorks -✖️ ReallyDoFetchToken -✖️ ReallyDoOpenAuthorizationPageInBrowser -✖️ ReallyDoRefreshToken -✔️ ThrowsAccessDeniedExceptionWithInvalidToken +✅ FileLifecycleWorks +⚪ ReallyDoFetchToken +⚪ ReallyDoOpenAuthorizationPageInBrowser +⚪ ReallyDoRefreshToken +✅ ThrowsAccessDeniedExceptionWithInvalidToken ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.FtpCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.FtpCloudStorageClientTest ``` -✔️ FileLifecycleWorks -✔️ SanitizeCredentials_ChangesInvalidPrefix -✔️ SecureSslConnectionWorks -✔️ ThrowsWithHttpInsteadOfFtp -✖️ ThrowsWithInvalidPassword -✖️ ThrowsWithInvalidUrl -✖️ ThrowsWithInvalidUsername +✅ FileLifecycleWorks +✅ SanitizeCredentials_ChangesInvalidPrefix +✅ SecureSslConnectionWorks +✅ ThrowsWithHttpInsteadOfFtp +⚪ ThrowsWithInvalidPassword +⚪ ThrowsWithInvalidUrl +⚪ ThrowsWithInvalidUsername ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.GmxCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.GmxCloudStorageClientTest ``` -✔️ ChoosesCorrectUrlForGmxComEmail -✔️ ChoosesCorrectUrlForGmxNetEmail +✅ ChoosesCorrectUrlForGmxComEmail +✅ ChoosesCorrectUrlForGmxNetEmail ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.GoogleCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.GoogleCloudStorageClientTest ``` -✔️ FileLifecycleWorks -✖️ ReallyDoFetchToken -✖️ ReallyDoOpenAuthorizationPageInBrowser -✖️ ReallyDoRefreshToken +✅ FileLifecycleWorks +⚪ ReallyDoFetchToken +⚪ ReallyDoOpenAuthorizationPageInBrowser +⚪ ReallyDoRefreshToken ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.OnedriveCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.OnedriveCloudStorageClientTest ``` -✔️ FileLifecycleWorks -✖️ ReallyDoFetchToken -✖️ ReallyDoOpenAuthorizationPageInBrowser -✖️ ReallyDoRefreshToken +✅ FileLifecycleWorks +⚪ ReallyDoFetchToken +⚪ ReallyDoOpenAuthorizationPageInBrowser +⚪ ReallyDoRefreshToken ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageProviders.WebdavCloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.CloudStorageProviders.WebdavCloudStorageClientTest ``` -✔️ FileLifecycleWorks -✔️ ParseGmxWebdavResponseCorrectly -✔️ ParseStratoWebdavResponseCorrectly -✔️ ThrowsWithInvalidPath -✔️ ThrowsWithInvalidUsername +✅ FileLifecycleWorks +✅ ParseGmxWebdavResponseCorrectly +✅ ParseStratoWebdavResponseCorrectly +✅ ThrowsWithInvalidPath +✅ ThrowsWithInvalidUsername ``` -### ✔️ VanillaCloudStorageClientTest.CloudStorageTokenTest +### ✅ VanillaCloudStorageClientTest.CloudStorageTokenTest ``` -✔️ AreEqualWorksWithNullDate -✔️ AreEqualWorksWithSameContent -✔️ NeedsRefreshReturnsFalseForTokenFlow -✔️ NeedsRefreshReturnsFalseIfNotExpired -✔️ NeedsRefreshReturnsTrueIfExpired -✔️ NeedsRefreshReturnsTrueIfNoExpirationDate -✔️ SetExpiryDateBySecondsWorks -✔️ SetExpiryDateBySecondsWorksWithNull -✔️ SetExpiryDateBySecondsWorksWithVeryShortPeriod +✅ AreEqualWorksWithNullDate +✅ AreEqualWorksWithSameContent +✅ NeedsRefreshReturnsFalseForTokenFlow +✅ NeedsRefreshReturnsFalseIfNotExpired +✅ NeedsRefreshReturnsTrueIfExpired +✅ NeedsRefreshReturnsTrueIfNoExpirationDate +✅ SetExpiryDateBySecondsWorks +✅ SetExpiryDateBySecondsWorksWithNull +✅ SetExpiryDateBySecondsWorksWithVeryShortPeriod ``` -### ✔️ VanillaCloudStorageClientTest.OAuth2.AuthorizationResponseErrorTest +### ✅ VanillaCloudStorageClientTest.OAuth2.AuthorizationResponseErrorTest ``` -✔️ ParsesAllErrorCodesCorrectly -✔️ ParsesNullErrorCodeCorrectly -✔️ ParsesUnknownErrorCodeCorrectly +✅ ParsesAllErrorCodesCorrectly +✅ ParsesNullErrorCodeCorrectly +✅ ParsesUnknownErrorCodeCorrectly ``` -### ✔️ VanillaCloudStorageClientTest.OAuth2.OAuth2UtilsTest +### ✅ VanillaCloudStorageClientTest.OAuth2.OAuth2UtilsTest ``` -✔️ BuildAuthorizationRequestUrlEscapesParameters -✔️ BuildAuthorizationRequestUrlLeavesOutOptionalParameters -✔️ BuildAuthorizationRequestUrlThrowsWithMissingRedirectUrlForTokenFlow -✔️ BuildAuthorizationRequestUrlUsesAllParameters -✔️ BuildAuthorizationRequestUrlUsesCodeVerifier -✔️ ParseRealWorldDropboxRejectResponse -✔️ ParseRealWorldDropboxSuccessResponse -✔️ ParseRealWorldGoogleRejectResponse -✔️ ParseRealWorldGoogleSuccessResponse +✅ BuildAuthorizationRequestUrlEscapesParameters +✅ BuildAuthorizationRequestUrlLeavesOutOptionalParameters +✅ BuildAuthorizationRequestUrlThrowsWithMissingRedirectUrlForTokenFlow +✅ BuildAuthorizationRequestUrlUsesAllParameters +✅ BuildAuthorizationRequestUrlUsesCodeVerifier +✅ ParseRealWorldDropboxRejectResponse +✅ ParseRealWorldDropboxSuccessResponse +✅ ParseRealWorldGoogleRejectResponse +✅ ParseRealWorldGoogleSuccessResponse ``` -### ✔️ VanillaCloudStorageClientTest.OAuth2CloudStorageClientTest +### ✅ VanillaCloudStorageClientTest.OAuth2CloudStorageClientTest ``` -✔️ BuildOAuth2AuthorizationRequestUrlWorks -✔️ FetchTokenCanInterpretGoogleResponse -✔️ FetchTokenReturnsNullForDeniedAccess -✔️ FetchTokenThrowsWithWrongState -✔️ RefreshTokenCanInterpretGoogleResponse +✅ BuildOAuth2AuthorizationRequestUrlWorks +✅ FetchTokenCanInterpretGoogleResponse +✅ FetchTokenReturnsNullForDeniedAccess +✅ FetchTokenThrowsWithWrongState +✅ RefreshTokenCanInterpretGoogleResponse ``` -### ✔️ VanillaCloudStorageClientTest.SecureStringExtensionsTest +### ✅ VanillaCloudStorageClientTest.SecureStringExtensionsTest ``` -✔️ AreEqualsWorksCorrectly -✔️ CorrectlyConvertsSecureStringToString -✔️ CorrectlyConvertsSecureStringToUnicodeBytes -✔️ CorrectlyConvertsSecureStringToUtf8Bytes -✔️ CorrectlyConvertsStringToSecureString -✔️ CorrectlyConvertsUnicodeBytesToSecureString -✔️ CorrectlyConvertsUtf8BytesToSecureString +✅ AreEqualsWorksCorrectly +✅ CorrectlyConvertsSecureStringToString +✅ CorrectlyConvertsSecureStringToUnicodeBytes +✅ CorrectlyConvertsSecureStringToUtf8Bytes +✅ CorrectlyConvertsStringToSecureString +✅ CorrectlyConvertsUnicodeBytesToSecureString +✅ CorrectlyConvertsUtf8BytesToSecureString ``` -### ✔️ VanillaCloudStorageClientTest.SerializeableCloudStorageCredentialsTest +### ✅ VanillaCloudStorageClientTest.SerializeableCloudStorageCredentialsTest ``` -✔️ DecryptAfterDesrializationCanReadAllPropertiesBack -✔️ DecryptAfterDesrializationRespectsNullProperties -✔️ EncryptBeforeSerializationProtectsAllNecessaryProperties -✔️ EncryptBeforeSerializationRespectsNullProperties -✔️ SerializedDatacontractCanBeReadBack -✔️ SerializedDatacontractDoesNotContainNullProperties -✔️ SerializedDatacontractDoesNotContainPlaintextData -✔️ SerializedJsonCanBeReadBack -✔️ SerializedJsonDoesNotContainNullProperties -✔️ SerializedJsonDoesNotContainPlaintextData -✔️ SerializedXmlCanBeReadBack -✔️ SerializedXmlDoesNotContainNullProperties -✔️ SerializedXmlDoesNotContainPlaintextData -``` \ No newline at end of file +✅ DecryptAfterDesrializationCanReadAllPropertiesBack +✅ DecryptAfterDesrializationRespectsNullProperties +✅ EncryptBeforeSerializationProtectsAllNecessaryProperties +✅ EncryptBeforeSerializationRespectsNullProperties +✅ SerializedDatacontractCanBeReadBack +✅ SerializedDatacontractDoesNotContainNullProperties +✅ SerializedDatacontractDoesNotContainPlaintextData +✅ SerializedJsonCanBeReadBack +✅ SerializedJsonDoesNotContainNullProperties +✅ SerializedJsonDoesNotContainPlaintextData +✅ SerializedXmlCanBeReadBack +✅ SerializedXmlDoesNotContainNullProperties +✅ SerializedXmlDoesNotContainPlaintextData +``` +
\ No newline at end of file diff --git a/__tests__/__outputs__/swift-xunit.md b/__tests__/__outputs__/swift-xunit.md new file mode 100644 index 0000000..b001151 --- /dev/null +++ b/__tests__/__outputs__/swift-xunit.md @@ -0,0 +1,17 @@ +![Tests failed](https://img.shields.io/badge/tests-2%20passed%2C%201%20failed-critical) +|Report|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[fixtures/swift-xunit.xml](#user-content-r0)|2 ✅|1 ❌||220ms| +## ❌ fixtures/swift-xunit.xml +**3** tests were completed in **220ms** with **2** passed, **1** failed and **0** skipped. +|Test suite|Passed|Failed|Skipped|Time| +|:---|---:|---:|---:|---:| +|[TestResults](#user-content-r0s0)|2 ✅|1 ❌||220ms| +### ❌ TestResults +``` +AcmeLibTests.AcmeLibTests + ✅ test_always_pass + ✅ test_always_skip + ❌ test_always_fail + failed +``` \ No newline at end of file diff --git a/__tests__/__snapshots__/dart-json.test.ts.snap b/__tests__/__snapshots__/dart-json.test.ts.snap index 847db6a..88a7349 100644 --- a/__tests__/__snapshots__/dart-json.test.ts.snap +++ b/__tests__/__snapshots__/dart-json.test.ts.snap @@ -1,14 +1,14 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`dart-json tests matches report snapshot 1`] = ` TestRunResult { "path": "fixtures/dart-json.json", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Test 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Passing test", @@ -19,11 +19,11 @@ TestRunResult { }, TestGroupResult { "name": "Test 1 Test 1.1", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "package:test_api expect -test\\\\main_test.dart 13:9 main... +test\\main_test.dart 13:9 main... ", "line": 13, "message": "Expected: <2> @@ -36,9 +36,9 @@ test\\\\main_test.dart 13:9 main... "time": 20, }, TestCaseResult { - "error": Object { + "error": { "details": "package:darttest/main.dart 2:3 throwError -test\\\\main_test.dart 17:9 main... +test\\main_test.dart 17:9 main... ", "line": 17, "message": "Exception: Some error", @@ -52,10 +52,10 @@ test\\\\main_test.dart 17:9 main... }, TestGroupResult { "name": "Test 2", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { - "details": "test\\\\main_test.dart 24:7 main.. + "error": { + "details": "test\\main_test.dart 24:7 main.. ", "line": 24, "message": "Exception: Some error", @@ -72,12 +72,12 @@ test\\\\main_test.dart 17:9 main... "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "dart:isolate _RawReceivePortImpl._handleMessage ", "line": 5, @@ -108,12 +108,12 @@ test\\\\main_test.dart 17:9 main... exports[`dart-json tests report from rrousselGit/provider test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/flutter/provider-test-results.json", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "valueListenableProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "rebuilds when value change", @@ -139,7 +139,7 @@ TestRunResult { "time": 22, }, TestCaseResult { - "error": Object { + "error": { "details": "══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following TestFailure object was thrown running a test: Expected: <2> @@ -178,10 +178,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ListenableProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with MultiProvider", @@ -252,7 +252,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ListenableProvider value constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "pass down key", @@ -269,7 +269,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ListenableProvider stateful constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "called with context", @@ -295,10 +295,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "consumer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -321,7 +321,7 @@ Unexpected number of calls }, TestGroupResult { "name": "consumer2", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -344,7 +344,7 @@ Unexpected number of calls }, TestGroupResult { "name": "consumer3", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -367,7 +367,7 @@ Unexpected number of calls }, TestGroupResult { "name": "consumer4", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -390,7 +390,7 @@ Unexpected number of calls }, TestGroupResult { "name": "consumer5", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -413,7 +413,7 @@ Unexpected number of calls }, TestGroupResult { "name": "consumer6", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "obtains value from Provider", @@ -439,10 +439,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Use builder property, not child", @@ -453,7 +453,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ChangeNotifierProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "value", @@ -515,10 +515,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ChangeNotifierProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default", @@ -535,7 +535,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ListenableProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default", @@ -552,7 +552,7 @@ Unexpected number of calls }, TestGroupResult { "name": "Provider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default", @@ -569,7 +569,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ProxyProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "0", @@ -616,7 +616,7 @@ Unexpected number of calls }, TestGroupResult { "name": "MultiProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "with 1 ChangeNotifierProvider default", @@ -690,10 +690,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "MultiProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throw if providers is null", @@ -719,10 +719,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with MultiProvider", @@ -763,7 +763,7 @@ Unexpected number of calls }, TestGroupResult { "name": "StreamProvider()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "create and dispose stream with builder", @@ -783,10 +783,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "watch in layoutbuilder", @@ -827,7 +827,7 @@ Unexpected number of calls }, TestGroupResult { "name": "BuildContext", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "internal selected value is updated", @@ -985,10 +985,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ReassembleHandler", @@ -1014,10 +1014,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with MultiProvider", @@ -1076,7 +1076,7 @@ Unexpected number of calls }, TestGroupResult { "name": "FutureProvider()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "crashes if builder is null", @@ -1090,10 +1090,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with MultiProvider", @@ -1104,7 +1104,7 @@ Unexpected number of calls }, TestGroupResult { "name": "Provider.of", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws if T is dynamic", @@ -1139,7 +1139,7 @@ Unexpected number of calls }, TestGroupResult { "name": "Provider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws if the provided value is a Listenable/Stream", @@ -1177,10 +1177,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "regression test #377", @@ -1371,7 +1371,7 @@ Unexpected number of calls }, TestGroupResult { "name": "diagnostics", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "InheritedProvider.value", @@ -1406,7 +1406,7 @@ Unexpected number of calls }, TestGroupResult { "name": "InheritedProvider.value()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "markNeedsNotifyDependents during startListening is noop", @@ -1459,7 +1459,7 @@ Unexpected number of calls }, TestGroupResult { "name": "InheritedProvider()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "hasValue", @@ -1614,7 +1614,7 @@ Unexpected number of calls }, TestGroupResult { "name": "DeferredInheritedProvider.value()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "hasValue", @@ -1667,7 +1667,7 @@ Unexpected number of calls }, TestGroupResult { "name": "DeferredInheritedProvider()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "create can't call inherited widgets", @@ -1699,10 +1699,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ListenableProxyProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws if update is missing", @@ -1743,7 +1743,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ListenableProxyProvider variants", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ListenableProxyProvider", @@ -1787,10 +1787,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "asserts that builder/selector are not null", @@ -1900,10 +1900,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "asserts", @@ -1935,10 +1935,10 @@ Unexpected number of calls "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ProxyProvider", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws if the provided value is a Listenable/Stream", @@ -2009,7 +2009,7 @@ Unexpected number of calls }, TestGroupResult { "name": "ProxyProvider variants", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ProxyProvider2", diff --git a/__tests__/__snapshots__/dotnet-nunit.test.ts.snap b/__tests__/__snapshots__/dotnet-nunit.test.ts.snap new file mode 100644 index 0000000..529f702 --- /dev/null +++ b/__tests__/__snapshots__/dotnet-nunit.test.ts.snap @@ -0,0 +1,107 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`dotnet-nunit tests report from ./reports/dotnet test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/dotnet-nunit.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "CalculatorTests", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "Is_Even_Number(2)", + "result": "success", + "time": 0.622, + }, + TestCaseResult { + "error": { + "details": " at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 61 +", + "line": undefined, + "message": " Expected: True + But was: False +", + "path": undefined, + }, + "name": "Is_Even_Number(3)", + "result": "failed", + "time": 1.098, + }, + TestCaseResult { + "error": { + "details": " at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 33", + "line": undefined, + "message": "System.DivideByZeroException : Attempted to divide by zero.", + "path": undefined, + }, + "name": "Exception_In_TargetTest", + "result": "failed", + "time": 22.805, + }, + TestCaseResult { + "error": { + "details": " at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 39", + "line": undefined, + "message": "System.Exception : Test", + "path": undefined, + }, + "name": "Exception_In_Test", + "result": "failed", + "time": 0.528, + }, + TestCaseResult { + "error": { + "details": " at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 27 +", + "line": undefined, + "message": " Expected: 3 + But was: 2 +", + "path": undefined, + }, + "name": "Failing_Test", + "result": "failed", + "time": 28.162, + }, + TestCaseResult { + "error": undefined, + "name": "Passing_Test", + "result": "success", + "time": 0.23800000000000002, + }, + TestCaseResult { + "error": undefined, + "name": "Passing_Test_With_Description", + "result": "success", + "time": 0.135, + }, + TestCaseResult { + "error": undefined, + "name": "Skipped_Test", + "result": "skipped", + "time": 0.398, + }, + TestCaseResult { + "error": { + "details": "", + "line": undefined, + "message": "", + "path": undefined, + }, + "name": "Timeout_Test", + "result": "failed", + "time": 14.949, + }, + ], + }, + ], + "name": "DotnetTests.NUnitV3Tests.dll.DotnetTests.XUnitTests", + "totalTime": undefined, + }, + ], + "totalTime": 230.30800000000002, +} +`; diff --git a/__tests__/__snapshots__/dotnet-trx.test.ts.snap b/__tests__/__snapshots__/dotnet-trx.test.ts.snap index 0301a56..b9d272d 100644 --- a/__tests__/__snapshots__/dotnet-trx.test.ts.snap +++ b/__tests__/__snapshots__/dotnet-trx.test.ts.snap @@ -1,14 +1,14 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`dotnet-trx tests matches report snapshot 1`] = ` +exports[`dotnet-trx tests matches dotnet-trx report snapshot 1`] = ` TestRunResult { "path": "fixtures/dotnet-trx.trx", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Custom Name", @@ -16,12 +16,14 @@ TestRunResult { "time": 0.1371, }, TestCaseResult { - "error": Object { + "error": { "details": "System.DivideByZeroException : Attempted to divide by zero. - at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.Unit\\\\Calculator.cs:line 9 - at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.XUnitTests\\\\CalculatorTests.cs:line 33", + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 33", "line": 9, - "message": "System.DivideByZeroException : Attempted to divide by zero.", + "message": "System.DivideByZeroException : Attempted to divide by zero. + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 33", "path": "DotnetTests.Unit/Calculator.cs", }, "name": "Exception_In_TargetTest", @@ -29,11 +31,12 @@ TestRunResult { "time": 0.8377, }, TestCaseResult { - "error": Object { + "error": { "details": "System.Exception : Test - at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.XUnitTests\\\\CalculatorTests.cs:line 39", + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 39", "line": 39, - "message": "System.Exception : Test", + "message": "System.Exception : Test + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 39", "path": "DotnetTests.XUnitTests/CalculatorTests.cs", }, "name": "Exception_In_Test", @@ -41,15 +44,16 @@ TestRunResult { "time": 2.5175, }, TestCaseResult { - "error": Object { + "error": { "details": "Assert.Equal() Failure Expected: 3 Actual: 2 - at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.XUnitTests\\\\CalculatorTests.cs:line 27", + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 27", "line": 27, "message": "Assert.Equal() Failure Expected: 3 -Actual: 2", +Actual: 2 + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 27", "path": "DotnetTests.XUnitTests/CalculatorTests.cs", }, "name": "Failing_Test", @@ -63,15 +67,16 @@ Actual: 2", "time": 0.0078, }, TestCaseResult { - "error": Object { + "error": { "details": "Assert.True() Failure Expected: True Actual: False - at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.XUnitTests\\\\CalculatorTests.cs:line 59", + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 59", "line": 59, "message": "Assert.True() Failure Expected: True -Actual: False", +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 59", "path": "DotnetTests.XUnitTests/CalculatorTests.cs", }, "name": "Is_Even_Number(i: 3)", @@ -91,15 +96,221 @@ Actual: False", "time": 0.0097, }, TestCaseResult { - "error": Object { + "error": { "details": "Assert.True() Failure Expected: True Actual: False - at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.XUnitTests\\\\CalculatorTests.cs:line 67", + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 67", "line": 67, "message": "Assert.True() Failure Expected: True -Actual: False", +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 67", + "path": "DotnetTests.XUnitTests/CalculatorTests.cs", + }, + "name": "Should be even number(i: 3)", + "result": "failed", + "time": 0.6537000000000001, + }, + TestCaseResult { + "error": undefined, + "name": "Skipped_Test", + "result": "skipped", + "time": 1, + }, + TestCaseResult { + "error": undefined, + "name": "Timeout_Test", + "result": "success", + "time": 108.42580000000001, + }, + ], + }, + ], + "name": "DotnetTests.XUnitTests.CalculatorTests", + "totalTime": undefined, + }, + ], + "totalTime": 1116, +} +`; + +exports[`dotnet-trx tests matches dotnet-xunitv3 report snapshot 1`] = ` +TestRunResult { + "path": "fixtures/dotnet-xunitv3.trx", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": null, + "tests": [ + TestCaseResult { + "error": { + "details": "Assert.Null() Failure: Value is not null +Expected: null +Actual: Fixture { } + at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25 + at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) + at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)", + "line": 25, + "message": "Assert.Null() Failure: Value is not null +Expected: null +Actual: Fixture { } + at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25 + at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) + at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)", + "path": "DotnetTests.XUnitV3Tests/FixtureTests.cs", + }, + "name": "Failing_Test", + "result": "failed", + "time": 17.0545, + }, + TestCaseResult { + "error": undefined, + "name": "Passing_Test", + "result": "success", + "time": 0.8786, + }, + ], + }, + ], + "name": "DotnetTests.XUnitV3Tests.FixtureTests", + "totalTime": undefined, + }, + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": null, + "tests": [ + TestCaseResult { + "error": undefined, + "name": "[Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test)]", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "[Test Class Cleanup Failure (DotnetTests.XUnitV3Tests.FixtureTests.Passing_Test)]", + "result": "failed", + "time": 0, + }, + ], + }, + ], + "name": "Unclassified", + "totalTime": undefined, + }, + ], + "totalTime": 267, +} +`; + +exports[`dotnet-trx tests matches report snapshot (only failed tests) 1`] = ` +TestRunResult { + "path": "fixtures/dotnet-trx.trx", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": null, + "tests": [ + TestCaseResult { + "error": undefined, + "name": "Custom Name", + "result": "success", + "time": 0.1371, + }, + TestCaseResult { + "error": { + "details": "System.DivideByZeroException : Attempted to divide by zero. + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 33", + "line": 9, + "message": "System.DivideByZeroException : Attempted to divide by zero. + at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9 + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 33", + "path": "DotnetTests.Unit/Calculator.cs", + }, + "name": "Exception_In_TargetTest", + "result": "failed", + "time": 0.8377, + }, + TestCaseResult { + "error": { + "details": "System.Exception : Test + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 39", + "line": 39, + "message": "System.Exception : Test + at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 39", + "path": "DotnetTests.XUnitTests/CalculatorTests.cs", + }, + "name": "Exception_In_Test", + "result": "failed", + "time": 2.5175, + }, + TestCaseResult { + "error": { + "details": "Assert.Equal() Failure +Expected: 3 +Actual: 2 + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 27", + "line": 27, + "message": "Assert.Equal() Failure +Expected: 3 +Actual: 2 + at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 27", + "path": "DotnetTests.XUnitTests/CalculatorTests.cs", + }, + "name": "Failing_Test", + "result": "failed", + "time": 3.8697, + }, + TestCaseResult { + "error": undefined, + "name": "Is_Even_Number(i: 2)", + "result": "success", + "time": 0.0078, + }, + TestCaseResult { + "error": { + "details": "Assert.True() Failure +Expected: True +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 59", + "line": 59, + "message": "Assert.True() Failure +Expected: True +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 59", + "path": "DotnetTests.XUnitTests/CalculatorTests.cs", + }, + "name": "Is_Even_Number(i: 3)", + "result": "failed", + "time": 0.41409999999999997, + }, + TestCaseResult { + "error": undefined, + "name": "Passing_Test", + "result": "success", + "time": 0.1365, + }, + TestCaseResult { + "error": undefined, + "name": "Should be even number(i: 2)", + "result": "success", + "time": 0.0097, + }, + TestCaseResult { + "error": { + "details": "Assert.True() Failure +Expected: True +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 67", + "line": 67, + "message": "Assert.True() Failure +Expected: True +Actual: False + at DotnetTests.XUnitTests.CalculatorTests.Theory_With_Custom_Name(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.XUnitTests\\CalculatorTests.cs:line 67", "path": "DotnetTests.XUnitTests/CalculatorTests.cs", }, "name": "Should be even number(i: 3)", @@ -132,12 +343,12 @@ Actual: False", exports[`dotnet-trx tests report from FluentValidation test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/FluentValidation.Tests.trx", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_replace_default_errorcode_resolver", @@ -355,10 +566,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Benchmark", @@ -396,10 +607,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Finds_validators_for_types", @@ -419,10 +630,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Cascade_mode_can_be_set_after_validator_instantiated", @@ -658,10 +869,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_validate_using_validator_for_base_type", @@ -747,10 +958,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Options_should_only_apply_to_current_validator", @@ -776,10 +987,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_define_nested_rules_for_collection", @@ -799,10 +1010,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_condition_should_work_with_child_collection", @@ -906,10 +1117,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_condition_should_work_with_complex_property", @@ -1019,10 +1230,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_condition_executed_synchronosuly_with_asynchronous_collection_rule", @@ -1138,10 +1349,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "IsValidTests", @@ -1161,10 +1372,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Does_not_invoke_action_if_validation_success", @@ -1190,10 +1401,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Replaces_propertyvalue_placeholder", @@ -1237,10 +1448,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "New_Custom_Returns_single_failure", @@ -1308,10 +1519,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Empty_should_create_EmptyValidator", @@ -1499,139 +1710,139 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\" \\\\r \\\\t \\\\n\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: " \\r \\t \\n")", "result": "success", "time": 0.0247, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "")", "result": "success", "time": 0.0314, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"@someDomain.com\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "@someDomain.com")", "result": "success", "time": 0.0248, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"@someDomain@abc.com\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "@someDomain@abc.com")", "result": "success", "time": 0.0234, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"0\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "0")", "result": "success", "time": 0.2222, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"someName\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "someName")", "result": "success", "time": 0.023, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"someName@\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "someName@")", "result": "success", "time": 0.022699999999999998, }, TestCaseResult { "error": undefined, - "name": "Fails_email_validation_aspnetcore_compatible(email: \\"someName@a@b.com\\")", + "name": "Fails_email_validation_aspnetcore_compatible(email: "someName@a@b.com")", "result": "success", "time": 0.022699999999999998, }, TestCaseResult { "error": undefined, - "name": "Invalid_email_addressex_regex(email: \\"\\")", + "name": "Invalid_email_addressex_regex(email: "")", "result": "success", "time": 0.3859, }, TestCaseResult { "error": undefined, - "name": "Invalid_email_addressex_regex(email: \\"first.last@test..co.uk\\")", + "name": "Invalid_email_addressex_regex(email: "first.last@test..co.uk")", "result": "success", "time": 0.0334, }, TestCaseResult { "error": undefined, - "name": "Invalid_email_addressex_regex(email: \\"testperso\\")", + "name": "Invalid_email_addressex_regex(email: "testperso")", "result": "success", "time": 0.0395, }, TestCaseResult { "error": undefined, - "name": "Invalid_email_addressex_regex(email: \\"thisisaverylongstringcodeplex.com\\")", + "name": "Invalid_email_addressex_regex(email: "thisisaverylongstringcodeplex.com")", "result": "success", "time": 0.0316, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\" @someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: " @someDomain.com")", "result": "success", "time": 0.0173, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"!#$%&'*+-/=?^_\`|~@someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "!#$%&'*+-/=?^_\`|~@someDomain.com")", "result": "success", "time": 0.0174, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"\\\\\\"firstName.lastName\\\\\\"@someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "\\"firstName.lastName\\"@someDomain.com")", "result": "success", "time": 0.0167, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"1234@someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "1234@someDomain.com")", "result": "success", "time": 0.0307, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"firstName.lastName@someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "firstName.lastName@someDomain.com")", "result": "success", "time": 0.0191, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"someName@1234.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "someName@1234.com")", "result": "success", "time": 0.0158, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"someName@some_domain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "someName@some_domain.com")", "result": "success", "time": 0.0162, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"someName@some~domain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "someName@some~domain.com")", "result": "success", "time": 0.0166, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"someName@someDomain.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain.com")", "result": "success", "time": 0.0167, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_aspnetcore_compatible(email: \\"someName@someDomain￯.com\\")", + "name": "Valid_email_addresses_aspnetcore_compatible(email: "someName@someDomain￯.com")", "result": "success", "time": 0.0157, }, @@ -1643,73 +1854,73 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"__somename@example.com\\")", + "name": "Valid_email_addresses_regex(email: "__somename@example.com")", "result": "success", "time": 0.0219, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"!def!xyz%abc@example.com\\")", + "name": "Valid_email_addresses_regex(email: "!def!xyz%abc@example.com")", "result": "success", "time": 0.022, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"\\\\\\"Abc@def\\\\\\"@example.com\\")", + "name": "Valid_email_addresses_regex(email: "\\"Abc@def\\"@example.com")", "result": "success", "time": 0.0245, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"\\\\\\"Abc\\\\\\\\@def\\\\\\"@example.com\\")", + "name": "Valid_email_addresses_regex(email: "\\"Abc\\\\@def\\"@example.com")", "result": "success", "time": 0.026, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"\\\\\\"Fred Bloggs\\\\\\"@example.com\\")", + "name": "Valid_email_addresses_regex(email: "\\"Fred Bloggs\\"@example.com")", "result": "success", "time": 0.0258, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"\\\\\\"Joe\\\\\\\\Blow\\\\\\"@example.com\\")", + "name": "Valid_email_addresses_regex(email: "\\"Joe\\\\Blow\\"@example.com")", "result": "success", "time": 0.0244, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"$A12345@example.com\\")", + "name": "Valid_email_addresses_regex(email: "$A12345@example.com")", "result": "success", "time": 0.022600000000000002, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"customer/department=shipping@example.com\\")", + "name": "Valid_email_addresses_regex(email: "customer/department=shipping@example.com")", "result": "success", "time": 0.0234, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"first.last@test.co.uk\\")", + "name": "Valid_email_addresses_regex(email: "first.last@test.co.uk")", "result": "success", "time": 0.022600000000000002, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"testperson@gmail.com\\")", + "name": "Valid_email_addresses_regex(email: "testperson@gmail.com")", "result": "success", "time": 16.3384, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"TestPerson@gmail.com\\")", + "name": "Valid_email_addresses_regex(email: "TestPerson@gmail.com")", "result": "success", "time": 0.0805, }, TestCaseResult { "error": undefined, - "name": "Valid_email_addresses_regex(email: \\"testperson+label@gmail.com\\")", + "name": "Valid_email_addresses_regex(email: "testperson+label@gmail.com")", "result": "success", "time": 0.0275, }, @@ -1726,10 +1937,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Passes_for_ienumerable_that_doesnt_implement_ICollection", @@ -1791,10 +2002,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Flags_enum_invalid_when_using_outofrange_negative_value", @@ -1874,10 +2085,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -1945,10 +2156,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Min_and_max_properties_should_be_set", @@ -1992,10 +2203,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "To_and_from_properties_should_be_set", @@ -2117,10 +2328,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Should_extract_member_from_member_expression", @@ -2152,10 +2363,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_condition_should_work_with_child_collection", @@ -2367,10 +2578,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -2462,10 +2673,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -2551,10 +2762,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "To_and_from_properties_should_be_set", @@ -2670,10 +2881,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_use_custom_subclass_with_nongeneric_overload", @@ -2747,10 +2958,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Uses_inline_validator_to_build_rules", @@ -2764,10 +2975,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "All_languages_should_be_loaded", @@ -2836,19 +3047,19 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_bosnian_latin_culture(cultureName: \\"bs-Latn-BA\\")", + "name": "Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn-BA")", "result": "success", "time": 0.011, }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_bosnian_latin_culture(cultureName: \\"bs-Latn\\")", + "name": "Gets_translation_for_bosnian_latin_culture(cultureName: "bs-Latn")", "result": "success", "time": 0.0627, }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_bosnian_latin_culture(cultureName: \\"bs\\")", + "name": "Gets_translation_for_bosnian_latin_culture(cultureName: "bs")", "result": "success", "time": 0.661, }, @@ -2866,19 +3077,19 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_serbian_culture(cultureName: \\"sr-Latn-RS\\")", + "name": "Gets_translation_for_serbian_culture(cultureName: "sr-Latn-RS")", "result": "success", "time": 0.01, }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_serbian_culture(cultureName: \\"sr-Latn\\")", + "name": "Gets_translation_for_serbian_culture(cultureName: "sr-Latn")", "result": "success", "time": 0.0484, }, TestCaseResult { "error": undefined, - "name": "Gets_translation_for_serbian_culture(cultureName: \\"sr\\")", + "name": "Gets_translation_for_serbian_culture(cultureName: "sr")", "result": "success", "time": 0.4456, }, @@ -2901,10 +3112,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Min_and_max_properties_should_be_set", @@ -3008,10 +3219,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -3097,10 +3308,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -3204,10 +3415,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Correctly_assigns_default_localized_error_message", @@ -3251,10 +3462,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Uses_localized_name", @@ -3274,10 +3485,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ComplexPropertyGet", @@ -3339,10 +3550,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Adds_argument_and_custom_arguments", @@ -3410,10 +3621,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_use_child_validator_at_model_level", @@ -3433,10 +3644,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Resolves_nested_properties", @@ -3462,10 +3673,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Fails_for_array", @@ -3533,10 +3744,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Comparison_property_uses_custom_resolver", @@ -3610,10 +3821,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Fails_when_nullable_value_type_is_null", @@ -3651,10 +3862,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Not_null_validator_should_not_crash_with_non_nullable_value_type", @@ -3692,10 +3903,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "OnFailure_called_for_each_failed_rule", @@ -3763,10 +3974,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Should_fail_when_predicate_returns_false", @@ -3804,10 +4015,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "AddIndexer_throws_when_nothing_added", @@ -3857,10 +4068,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_access_expression_in_message", @@ -3958,10 +4169,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Adding_a_validator_should_return_builder", @@ -4143,10 +4354,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_inside_dependent_rules", @@ -4238,10 +4449,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Applies_multiple_rulesets_to_rule", @@ -4375,10 +4586,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Scale_precision_should_be_valid", @@ -4422,10 +4633,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Async_condition_can_be_used_inside_ruleset", @@ -4685,10 +4896,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Should_validate_property_value_without_instance", @@ -4702,10 +4913,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "IsValidTests_CaseInsensitive_CaseCorrect", @@ -4773,10 +4984,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Add_AddsItem", @@ -4802,10 +5013,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Transforms_collection_element", @@ -4837,10 +5048,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_Provide_conditional_severity", @@ -4890,10 +5101,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_Provide_state_for_item_in_collection", @@ -4925,10 +5136,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Does_not_throw_when_valid", @@ -5020,10 +5231,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_serialize_failure", @@ -5079,10 +5290,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Does_not_throw_when_rule_declared_without_property", @@ -5120,10 +5331,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Can_use_property_with_include", @@ -5191,10 +5402,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Allows_only_one_failure_to_match", @@ -5353,7 +5564,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: \\"\\")", + "name": "ShouldHaveValidationError_should_not_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "")", "result": "success", "time": 0.6089, }, @@ -5389,13 +5600,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: \\"\\")", + "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "")", "result": "success", "time": 1.7937, }, TestCaseResult { "error": undefined, - "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: \\"cardNumber\\")", + "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 17, cardNumber: "cardNumber")", "result": "success", "time": 0.6412, }, @@ -5407,7 +5618,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 42, cardNumber: \\"cardNumber\\")", + "name": "ShouldHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_Is_Used(age: 42, cardNumber: "cardNumber")", "result": "success", "time": 0.8127, }, @@ -5521,13 +5732,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: \\"\\")", + "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "")", "result": "success", "time": 0.5719, }, TestCaseResult { "error": undefined, - "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: \\"cardNumber\\")", + "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 17, cardNumber: "cardNumber")", "result": "success", "time": 0.5838, }, @@ -5539,13 +5750,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: \\"cardNumber\\")", + "name": "ShouldNotHaveValidationError_should_throw_when_there_are_not_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "cardNumber")", "result": "success", "time": 0.897, }, TestCaseResult { "error": undefined, - "name": "ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: \\"\\")", + "name": "ShouldNotHaveValidationError_should_throw_when_there_are_validation_errors__WhenAsyn_is_used(age: 42, cardNumber: "")", "result": "success", "time": 0.6807, }, @@ -5599,25 +5810,25 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "Unexpected_message_check(withoutErrMsg: \\"bar\\", errMessages: [\\"bar\\"])", + "name": "Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["bar"])", "result": "success", "time": 0.1548, }, TestCaseResult { "error": undefined, - "name": "Unexpected_message_check(withoutErrMsg: \\"bar\\", errMessages: [\\"foo\\", \\"bar\\"])", + "name": "Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo", "bar"])", "result": "success", "time": 0.1797, }, TestCaseResult { "error": undefined, - "name": "Unexpected_message_check(withoutErrMsg: \\"bar\\", errMessages: [\\"foo\\"])", + "name": "Unexpected_message_check(withoutErrMsg: "bar", errMessages: ["foo"])", "result": "success", "time": 0.3297, }, TestCaseResult { "error": undefined, - "name": "Unexpected_message_check(withoutErrMsg: \\"bar\\", errMessages: [])", + "name": "Unexpected_message_check(withoutErrMsg: "bar", errMessages: [])", "result": "success", "time": 0.7345999999999999, }, @@ -5647,12 +5858,12 @@ TestRunResult { exports[`dotnet-trx tests report from SilentNotes test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/SilentNotes.trx", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "AreEqualWorksWithDifferentPassword", @@ -5696,10 +5907,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "FileLifecycleWorks", @@ -5737,10 +5948,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "FileLifecycleWorks", @@ -5790,10 +6001,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ChoosesCorrectUrlForGmxComEmail", @@ -5813,10 +6024,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "FileLifecycleWorks", @@ -5848,10 +6059,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "FileLifecycleWorks", @@ -5883,10 +6094,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "FileLifecycleWorks", @@ -5924,10 +6135,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "AreEqualWorksWithNullDate", @@ -5989,10 +6200,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ParsesAllErrorCodesCorrectly", @@ -6018,10 +6229,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "BuildAuthorizationRequestUrlEscapesParameters", @@ -6083,10 +6294,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "BuildOAuth2AuthorizationRequestUrlWorks", @@ -6124,10 +6335,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "AreEqualsWorksCorrectly", @@ -6177,10 +6388,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "DecryptAfterDesrializationCanReadAllPropertiesBack", diff --git a/__tests__/__snapshots__/golang-json.test.ts.snap b/__tests__/__snapshots__/golang-json.test.ts.snap new file mode 100644 index 0000000..bd28d4a --- /dev/null +++ b/__tests__/__snapshots__/golang-json.test.ts.snap @@ -0,0 +1,131 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`golang-json tests report from ./reports/dotnet test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/golang-json.json", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": null, + "tests": [ + TestCaseResult { + "error": undefined, + "name": "TestPassing", + "result": "success", + "time": 60, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:19: expected 1+1 = 3, got 2 +", + "message": "calculator_test.go:19: expected 1+1 = 3, got 2 +", + }, + "name": "TestFailing", + "result": "failed", + "time": 890, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:76: caught panic: runtime error: integer divide by zero +", + "message": "calculator_test.go:76: caught panic: runtime error: integer divide by zero +", + }, + "name": "TestPanicInsideFunction", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:76: caught panic: bad stuff +", + "message": "calculator_test.go:76: caught panic: bad stuff +", + }, + "name": "TestPanicInsideTest", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:45: skipping test +", + "message": "calculator_test.go:45: skipping test +", + }, + "name": "TestSkipped", + "result": "skipped", + "time": 940, + }, + TestCaseResult { + "error": { + "details": "", + "message": "", + }, + "name": "TestCases", + "result": "failed", + "time": 2250, + }, + ], + }, + TestGroupResult { + "name": "TestCases", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "1_+_2_=_3", + "result": "success", + "time": 400, + }, + TestCaseResult { + "error": undefined, + "name": "4_+_7_=_11", + "result": "success", + "time": 460, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:67: expected 2 + 3 = 4, got 5 +", + "message": "calculator_test.go:67: expected 2 + 3 = 4, got 5 +", + }, + "name": "2_+_3_=_4", + "result": "failed", + "time": 90, + }, + TestCaseResult { + "error": { + "details": "calculator_test.go:67: expected 1 / 2 = 1, got 0 +", + "message": "calculator_test.go:67: expected 1 / 2 = 1, got 0 +", + }, + "name": "1_/_2_=_1", + "result": "failed", + "time": 920, + }, + TestCaseResult { + "error": undefined, + "name": "9_/_3_=_3", + "result": "success", + "time": 340, + }, + TestCaseResult { + "error": undefined, + "name": "14_/_7_=_2", + "result": "success", + "time": 40, + }, + ], + }, + ], + "name": "_/home/james_t/git/test-reporter/reports/go", + "totalTime": undefined, + }, + ], + "totalTime": undefined, +} +`; diff --git a/__tests__/__snapshots__/java-junit.test.ts.snap b/__tests__/__snapshots__/java-junit.test.ts.snap index 73c5f80..38daca9 100644 --- a/__tests__/__snapshots__/java-junit.test.ts.snap +++ b/__tests__/__snapshots__/java-junit.test.ts.snap @@ -1,14 +1,14 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`java-junit tests report from apache/pulsar single suite test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/java/TEST-org.apache.pulsar.AddMissingPatchVersionTest.xml", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testVersionStrings", @@ -16,7 +16,7 @@ TestRunResult { "time": 99, }, TestCaseResult { - "error": Object { + "error": { "details": " java.lang.AssertionError: expected [1.2.1] but found [1.2.0] at org.testng.Assert.fail(Assert.java:99) @@ -41,7 +41,7 @@ at java.lang.Thread.run(Thread.java:748) ", "line": 29, - "message": undefined, + "message": "java.lang.AssertionError: expected [1.2.1] but found [1.2.0]", "path": "pulsar-common/src/test/java/org/apache/pulsar/AddMissingPatchVersionTest.java", }, "name": "testVersionStrings", @@ -62,12 +62,12 @@ at java.lang.Thread.run(Thread.java:748) exports[`java-junit tests report from apache/pulsar test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/java/pulsar-test-report.xml", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testVersionStrings", @@ -75,7 +75,7 @@ TestRunResult { "time": 99, }, TestCaseResult { - "error": Object { + "error": { "details": " java.lang.AssertionError: expected [1.2.1] but found [1.2.0] at org.testng.Assert.fail(Assert.java:99) @@ -100,7 +100,7 @@ at java.lang.Thread.run(Thread.java:748) ", "line": 29, - "message": undefined, + "message": "java.lang.AssertionError: expected [1.2.1] but found [1.2.0]", "path": "pulsar-common/src/test/java/org/apache/pulsar/AddMissingPatchVersionTest.java", }, "name": "testVersionStrings", @@ -114,10 +114,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 116, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMainRunBookieNoConfig", @@ -179,10 +179,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 591.0000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testGetWorkerService", @@ -202,10 +202,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 96, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testOwnedNamespaces", @@ -237,10 +237,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 9184.999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testOffloadPoliciesAppliedApi", @@ -290,10 +290,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 18584.000000000004, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "httpEndpoint", @@ -313,10 +313,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1389, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthentication", @@ -336,10 +336,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 185, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "simple", @@ -353,10 +353,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2384, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "crossColoLookup", @@ -388,10 +388,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1930, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCreateNamespaceWithDefaultBundles", @@ -411,10 +411,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 33168, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testGetAllPartitions", @@ -434,10 +434,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 32357, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSplitMapWithRefreshedStatMap", @@ -505,10 +505,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 75271.99999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testUnloadNotLoadedNamespace", @@ -528,10 +528,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 13704, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testOwnershipForCurrentServer", @@ -545,10 +545,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15709, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testGetOwnedServiceUnits", @@ -604,10 +604,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15749.999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testLoadProtocolHandler", @@ -633,10 +633,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7398.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testWrapper", @@ -650,10 +650,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testStart", @@ -697,10 +697,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 946.0000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMessagePublishBufferThrottleEnable", @@ -726,10 +726,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 13830, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testResumptionAfterBacklogRelaxed", @@ -869,10 +869,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 40154, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testReleaseOwnershipWithZookeeperDisconnectedBeforeOwnershipNodeDeleted", @@ -928,10 +928,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 114278, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testJvmDirectMemoryUsedMetric", @@ -951,10 +951,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 49, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAckStatsOnPartitionedTopicForExclusiveSubscription", @@ -980,10 +980,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 21163.999999999996, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testManagedCursorMetrics", @@ -997,10 +997,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 281, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testManagedLedgerMetrics", @@ -1014,10 +1014,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 285, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPerTopicStats", @@ -1115,10 +1115,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 83145.00000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConsumersAfterMarkDelete", @@ -1138,10 +1138,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1806, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSimpleAggregation", @@ -1155,10 +1155,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 40, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSendAndReceiveNamespaceEvents", @@ -1172,10 +1172,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1043, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "noSortedTest", @@ -1195,10 +1195,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 29646, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCloseReleaseAllEntries", @@ -1224,10 +1224,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 28, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAbortOnTopic", @@ -1259,10 +1259,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 93, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testOpenReaderOnNonExistentTxn", @@ -1312,10 +1312,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 80.99999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCloseShouldReleaseBuffer", @@ -1329,10 +1329,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 14, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTransactionBufferLowWaterMark", @@ -1352,10 +1352,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 37577, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "commitTxnTest", @@ -1381,10 +1381,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 49067.00000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testClientStart", @@ -1410,10 +1410,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 95, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTransactionMetaStoreAssignAndFailover", @@ -1427,10 +1427,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1151, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "txnAckTestNoBatchAndSharedSubMemoryDeleteTest", @@ -1456,10 +1456,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 57293.00000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRestException", @@ -1485,10 +1485,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 37.00000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTlsAuthDisallowInsecure", @@ -1550,10 +1550,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 27441.999999999996, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthorizedUserAsOriginalPrincipal", @@ -1585,10 +1585,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 8297, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSerializationEmpty", @@ -1620,10 +1620,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testBatchMessageIndexAckForExclusiveSubscription", @@ -1655,10 +1655,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 13732, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testBatchMessageIndexAckForSharedSubscription", @@ -1696,10 +1696,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 43856, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testDisconnectClientWithoutClosingConnection", @@ -1797,10 +1797,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 148203, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCompactedOutMessages", @@ -1814,10 +1814,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1385, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAckResponse", @@ -1831,10 +1831,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 549, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testReadCompactNonPersistentExclusive", @@ -1866,10 +1866,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 12164, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConsumerDedup", @@ -1919,10 +1919,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 3522.0000000000005, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConsumerUnsubscribeReference", @@ -1936,10 +1936,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 129, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTlsClientAuthOverHTTPProtocol", @@ -1965,10 +1965,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 23461, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTlsClientAuthOverHTTPProtocol", @@ -1994,10 +1994,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7675.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testValidate", @@ -2011,10 +2011,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 183, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testChecksumCompatibilityInMixedVersionBrokerCluster", @@ -2040,10 +2040,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 46690, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPublishWithFailure", @@ -2105,10 +2105,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 73214, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testWithoutBatches", @@ -2128,10 +2128,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 5484.999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testReadMessageWithBatchingWithMessageInclusive", @@ -2187,10 +2187,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 35143, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testNegativeAcks", @@ -2390,10 +2390,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 10661.999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testStartEmptyPatternConsumer", @@ -2467,10 +2467,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 62620, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSharedAckedNormalTopic", @@ -2508,10 +2508,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 33504, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMultiHostUrlRetrySuccess", @@ -2537,10 +2537,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15314, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSerializationAndDeserialization", @@ -2554,10 +2554,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 10, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "createTopicDeleteTopicCreateTopic", @@ -2571,10 +2571,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1937, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCheckSequenceId", @@ -2612,10 +2612,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 17976, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCreateConsumerOnNotExistsTopic", @@ -2635,10 +2635,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 4053, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSingleTopicConsumerNoBatchFullName", @@ -2676,10 +2676,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 13659, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTopicAutoUpdatePartitions", @@ -2789,10 +2789,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 133445.00000000003, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCheckUnAcknowledgedMessageTimer", @@ -2842,10 +2842,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 43828, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "zeroQueueSizeSharedSubscription", @@ -2937,10 +2937,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15712, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testGetProperties", @@ -2954,10 +2954,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 316, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testChecksumSendCommand", @@ -2971,10 +2971,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCompressDecompress", @@ -3018,10 +3018,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 223.00000000000003, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCompressDecompress", @@ -3299,10 +3299,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 737.0000000000005, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCrc32cHardware", @@ -3346,10 +3346,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 5403.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testLoadReportSerialization", @@ -3381,10 +3381,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1530, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testInvalidMetadata", @@ -3404,10 +3404,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 161, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testIncludes", @@ -3451,10 +3451,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 64, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConstructor", @@ -3492,10 +3492,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 98.99999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "namespace", @@ -3515,10 +3515,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 207, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testOptionalSettingPresent", @@ -3550,10 +3550,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testShortTopicName", @@ -3585,10 +3585,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 529, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testEmptyServiceUriString", @@ -3722,10 +3722,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 237.00000000000006, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAutoFailoverPolicyData", @@ -3739,10 +3739,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 15, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAutoFailoverPolicyType", @@ -3756,10 +3756,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 19, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testInvalidTopicType", @@ -3803,10 +3803,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 64, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testBacklogQuotaIdentity", @@ -3820,10 +3820,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 12, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "simple", @@ -3837,10 +3837,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 9, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConsumerStats", @@ -3854,10 +3854,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 8, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testDecodeFailed", @@ -3877,10 +3877,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 948, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testLocalPolices", @@ -3894,10 +3894,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testNamespaceIsolationData", @@ -3911,10 +3911,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 76, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSerialization", @@ -3928,10 +3928,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 45, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testGcsConfiguration", @@ -3975,10 +3975,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 216, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPartitionedTopicStats", @@ -3992,10 +3992,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 12, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPersistencePolicies", @@ -4009,10 +4009,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 19, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPersistentOfflineTopicStats", @@ -4026,10 +4026,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 29, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPersistentTopicStatsAggregation", @@ -4049,10 +4049,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 51, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "propertyAdmin", @@ -4084,10 +4084,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1386, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPublisherStats", @@ -4107,10 +4107,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 37, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testReplicatorStatsAdd", @@ -4130,10 +4130,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testResourceQuotaDefault", @@ -4153,10 +4153,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 45, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRetentionPolices", @@ -4170,10 +4170,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 8, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAutoFailoverPolicyFactory", @@ -4187,10 +4187,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 22, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMinAvailablePolicty", @@ -4204,10 +4204,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testBrokerAssignment", @@ -4257,10 +4257,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 265, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testFindBrokers", @@ -4310,10 +4310,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 309.00000000000006, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testEncoder", @@ -4333,10 +4333,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 4999.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSkipBrokerEntryMetadata", @@ -4386,10 +4386,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2812.0000000000005, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSnapshot", @@ -4433,10 +4433,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 3232.9999999999995, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testChannelRead", @@ -4450,10 +4450,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 3690, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testInvokeJVMInternals", @@ -4467,10 +4467,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 82, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMap", @@ -4484,10 +4484,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 242, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testFileNotModified", @@ -4531,10 +4531,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 6161.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMultipleTryAcquire", @@ -4608,10 +4608,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7199.999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testCreateInstanceNoNoArgConstructor", @@ -4691,10 +4691,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 172, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testParseRelativeTime", @@ -4708,10 +4708,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 39, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testResetWords", @@ -4731,10 +4731,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 13.000000000000002, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRecycle", @@ -4754,10 +4754,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 63, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRehashingWithDeletes", @@ -4843,10 +4843,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 28351.000000000004, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "concurrentInsertionsAndReads", @@ -4944,10 +4944,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1519.0000000000002, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRemove", @@ -5027,10 +5027,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 9241, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "concurrentInsertions", @@ -5104,10 +5104,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7114.999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAddForDifferentKey", @@ -5193,10 +5193,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1355.9999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "concurrentInsertions", @@ -5258,10 +5258,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 342, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testUpdateObject", @@ -5281,10 +5281,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 64, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "removeTest", @@ -5328,10 +5328,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 350, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testItems", @@ -5429,10 +5429,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 3092.9999999999995, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testQueue", @@ -5458,10 +5458,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 238, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "toCompletableFuture_shouldCompleteExceptionally_channelFutureCompletedAfter", @@ -5499,10 +5499,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1549.0000000000002, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRedirectUrlWithServerStarted", @@ -5516,10 +5516,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 4904, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthorizationWithAnonymousUser", @@ -5539,10 +5539,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 27527, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPulsarFunctionState", @@ -5568,10 +5568,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 42238, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testFunctionsCreation", @@ -5585,10 +5585,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 12012, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthorization", @@ -5602,10 +5602,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 30213, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "replayableProxyContentProviderTest", @@ -5619,10 +5619,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 474, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthenticatedProxyAsNonAdmin", @@ -5636,10 +5636,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2159, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testFunctionWorkerRedirect", @@ -5653,10 +5653,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 10, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test", @@ -5670,10 +5670,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 125, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testTlsSyncProducerAndConsumer", @@ -5687,10 +5687,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2279, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthentication", @@ -5704,10 +5704,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 16696, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testInboundConnection", @@ -5721,10 +5721,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1792, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testSimpleProduceAndConsume", @@ -5738,10 +5738,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 511, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testForwardAuthData", @@ -5755,10 +5755,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 31924, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testProxyToEndsInSlash", @@ -5826,10 +5826,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1660, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testProducerFailed", @@ -5855,10 +5855,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 6701.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPartitions", @@ -5884,10 +5884,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7220.000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testLookup", @@ -5901,10 +5901,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2568, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRegexSubscription", @@ -5942,10 +5942,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1345.9999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testIncorrectRoles", @@ -5959,10 +5959,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 10403, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testChangeLogLevel", @@ -5988,10 +5988,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 533, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testPartitions", @@ -6035,10 +6035,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2946.9999999999995, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testProducer", @@ -6058,10 +6058,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 414.00000000000006, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testServiceStartup", @@ -6075,10 +6075,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 4, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testProxyAuthorization", @@ -6092,10 +6092,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2128, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tlsCiphersAndProtocols", @@ -6181,10 +6181,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 32897, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testDiscoveryService", @@ -6198,10 +6198,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 2045, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testAuthWithRandoCert", @@ -6227,10 +6227,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 8235, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testUnauthenticatedProxy", @@ -6250,10 +6250,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 113.99999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test", @@ -6267,10 +6267,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 29041, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testIsUsingAvroSchemaParser", @@ -6296,10 +6296,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 30859, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testConsumerCompatibilityCheckCanReadLastTest", @@ -6445,10 +6445,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 107437.00000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testServiceException", @@ -6468,10 +6468,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 40751.99999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouldFailIfEnumParameterIsMissing", @@ -6515,10 +6515,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 23, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouldNotDoAnythingWhenThereIsBeforeAndAfterMethod", @@ -6556,10 +6556,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 36.00000000000001, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouldCallSetupBeforeRetrying", @@ -6597,10 +6597,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 27, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouldCallSetupOnce1", @@ -6626,10 +6626,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testHelp", @@ -6649,10 +6649,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 17, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testBooleanFormat", @@ -6684,10 +6684,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 49.99999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testLists", @@ -6731,10 +6731,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 59, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "unauthenticatedSocketTest", @@ -6766,10 +6766,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 28904.000000000004, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test", @@ -6783,10 +6783,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 1263, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "configTest", @@ -6806,10 +6806,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 8943, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "socketTest", @@ -6823,10 +6823,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 10821, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "socketTest", @@ -6840,10 +6840,10 @@ at java.lang.Thread.run(Thread.java:748) "totalTime": 7280, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "anonymousSocketTest", diff --git a/__tests__/__snapshots__/jest-junit.test.ts.snap b/__tests__/__snapshots__/jest-junit.test.ts.snap index 3a04722..eca0092 100644 --- a/__tests__/__snapshots__/jest-junit.test.ts.snap +++ b/__tests__/__snapshots__/jest-junit.test.ts.snap @@ -1,14 +1,98 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`jest-junit tests parsing ESLint report without timing information works - PR #134 1`] = ` +TestRunResult { + "path": "fixtures/jest-junit-eslint.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "test", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "test.jsx", + "result": "success", + "time": 0, + }, + ], + }, + ], + "name": "test.jsx", + "totalTime": 0, + }, + ], + "totalTime": undefined, +} +`; + +exports[`jest-junit tests parsing junit report with message succeeds 1`] = ` +TestRunResult { + "path": "fixtures/junit-with-message.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "Fails", + "tests": [ + TestCaseResult { + "error": { + "details": "error.cpp:01 + Expected: true + Which is: false >", + "line": undefined, + "path": undefined, + }, + "name": "Test", + "result": "failed", + "time": 0, + }, + ], + }, + ], + "name": "Test", + "totalTime": 1, + }, + ], + "totalTime": 1, +} +`; + +exports[`jest-junit tests report from #235 testing react components named 1`] = ` +TestRunResult { + "path": "fixtures/external/jest/jest-react-component-test-results.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "", + "tests": [ + TestCaseResult { + "error": undefined, + "name": " should render properly", + "result": "success", + "time": 704, + }, + ], + }, + ], + "name": "\\", + "totalTime": 798, + }, + ], + "totalTime": 1000, +} +`; exports[`jest-junit tests report from ./reports/jest test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/jest-junit.xml", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Test 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Passing test", @@ -19,18 +103,18 @@ TestRunResult { }, TestGroupResult { "name": "Test 1 › Test 1.1", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "Error: expect(received).toBeTruthy() Received: false - at Object. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\__tests__\\\\main.test.js:10:21) - at Object.asyncJestTest (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmineAsyncInstall.js:106:37) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:45:12 + at Object. (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\__tests__\\main.test.js:10:21) + at Object.asyncJestTest (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmineAsyncInstall.js:106:37) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:45:12 at new Promise () - at mapper (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:28:19) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:75:41 + at mapper (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:28:19) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:75:41 at processTicksAndRejections (internal/process/task_queues.js:97:5)", "line": 10, "path": "__tests__/main.test.js", @@ -40,15 +124,15 @@ Received: false "time": 2, }, TestCaseResult { - "error": Object { + "error": { "details": "Error: Some error - at Object.throwError (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\lib\\\\main.js:2:9) - at Object. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\__tests__\\\\main.test.js:14:11) - at Object.asyncJestTest (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmineAsyncInstall.js:106:37) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:45:12 + at Object.throwError (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\lib\\main.js:2:9) + at Object. (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\__tests__\\main.test.js:14:11) + at Object.asyncJestTest (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmineAsyncInstall.js:106:37) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:45:12 at new Promise () - at mapper (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:28:19) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:75:41 + at mapper (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:28:19) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:75:41 at processTicksAndRejections (internal/process/task_queues.js:97:5)", "line": 2, "path": "lib/main.js", @@ -61,16 +145,16 @@ Received: false }, TestGroupResult { "name": "Test 2", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "Error: Some error - at Object. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\__tests__\\\\main.test.js:21:11) - at Object.asyncJestTest (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmineAsyncInstall.js:106:37) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:45:12 + at Object. (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\__tests__\\main.test.js:21:11) + at Object.asyncJestTest (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmineAsyncInstall.js:106:37) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:45:12 at new Promise () - at mapper (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:28:19) - at C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\queueRunner.js:75:41 + at mapper (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:28:19) + at C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\queueRunner.js:75:41 at processTicksAndRejections (internal/process/task_queues.js:97:5)", "line": 21, "path": "__tests__/main.test.js", @@ -82,30 +166,30 @@ Received: false ], }, ], - "name": "__tests__\\\\main.test.js", + "name": "__tests__\\main.test.js", "totalTime": 486, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": ": Timeout - Async callback was not invoked within the 1 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 1 ms timeout specified by jest.setTimeout.Error: - at new Spec (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmine\\\\Spec.js:116:22) - at new Spec (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\setup_jest_globals.js:78:9) - at specFactory (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmine\\\\Env.js:523:24) - at Env.it (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmine\\\\Env.js:592:24) - at Env.it (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmineAsyncInstall.js:134:23) - at it (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\jasmine\\\\jasmineLight.js:100:21) - at Object. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\__tests__\\\\second.test.js:1:34) - at Runtime._execModule (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-runtime\\\\build\\\\index.js:1245:24) - at Runtime._loadModule (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-runtime\\\\build\\\\index.js:844:12) - at Runtime.requireModule (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-runtime\\\\build\\\\index.js:694:10) - at jasmine2 (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-jasmine2\\\\build\\\\index.js:230:13) - at runTestInternal (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-runner\\\\build\\\\runTest.js:380:22) - at runTest (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-check\\\\reports\\\\jest\\\\node_modules\\\\jest-runner\\\\build\\\\runTest.js:472:34)", + at new Spec (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmine\\Spec.js:116:22) + at new Spec (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\setup_jest_globals.js:78:9) + at specFactory (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmine\\Env.js:523:24) + at Env.it (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmine\\Env.js:592:24) + at Env.it (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmineAsyncInstall.js:134:23) + at it (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\jasmine\\jasmineLight.js:100:21) + at Object. (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\__tests__\\second.test.js:1:34) + at Runtime._execModule (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-runtime\\build\\index.js:1245:24) + at Runtime._loadModule (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-runtime\\build\\index.js:844:12) + at Runtime.requireModule (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-runtime\\build\\index.js:694:10) + at jasmine2 (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-jasmine2\\build\\index.js:230:13) + at runTestInternal (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-runner\\build\\runTest.js:380:22) + at runTest (C:\\Users\\Michal\\Workspace\\dorny\\test-check\\reports\\jest\\node_modules\\jest-runner\\build\\runTest.js:472:34)", "line": 1, "path": "__tests__/second.test.js", }, @@ -122,7 +206,7 @@ Received: false ], }, ], - "name": "__tests__\\\\second.test.js", + "name": "__tests__\\second.test.js", "totalTime": 82, }, ], @@ -133,12 +217,12 @@ Received: false exports[`jest-junit tests report from facebook/jest test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/jest/jest-test-results.xml", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "picks a name based on the rootDir", @@ -173,7 +257,7 @@ TestRunResult { }, TestGroupResult { "name": "rootDir", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws if the options is missing a rootDir property", @@ -184,7 +268,7 @@ TestRunResult { }, TestGroupResult { "name": "automock", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "falsy automock is not overwritten", @@ -195,7 +279,7 @@ TestRunResult { }, TestGroupResult { "name": "collectCoverageOnlyFrom", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normalizes all paths relative to rootDir", @@ -218,7 +302,7 @@ TestRunResult { }, TestGroupResult { "name": "collectCoverageFrom", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "substitutes tokens", @@ -229,7 +313,7 @@ TestRunResult { }, TestGroupResult { "name": "findRelatedTests", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "it generates --coverageCoverageFrom patterns when needed", @@ -240,7 +324,7 @@ TestRunResult { }, TestGroupResult { "name": "roots", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normalizes all paths relative to rootDir", @@ -263,7 +347,7 @@ TestRunResult { }, TestGroupResult { "name": "transform", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normalizes the path", @@ -280,7 +364,7 @@ TestRunResult { }, TestGroupResult { "name": "haste", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normalizes the path for hasteImplModulePath", @@ -291,7 +375,7 @@ TestRunResult { }, TestGroupResult { "name": "setupFilesAfterEnv", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normalizes the path according to rootDir", @@ -314,7 +398,7 @@ TestRunResult { }, TestGroupResult { "name": "setupTestFrameworkScriptFile", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "logs a deprecation warning when \`setupTestFrameworkScriptFile\` is used", @@ -331,7 +415,7 @@ TestRunResult { }, TestGroupResult { "name": "coveragePathIgnorePatterns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not normalize paths relative to rootDir", @@ -354,7 +438,7 @@ TestRunResult { }, TestGroupResult { "name": "watchPathIgnorePatterns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not normalize paths relative to rootDir", @@ -377,7 +461,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathIgnorePatterns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not normalize paths relative to rootDir", @@ -400,7 +484,7 @@ TestRunResult { }, TestGroupResult { "name": "modulePathIgnorePatterns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not normalize paths relative to rootDir", @@ -423,7 +507,7 @@ TestRunResult { }, TestGroupResult { "name": "testRunner", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to Circus", @@ -446,7 +530,7 @@ TestRunResult { }, TestGroupResult { "name": "coverageDirectory", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to /coverage", @@ -457,7 +541,7 @@ TestRunResult { }, TestGroupResult { "name": "testEnvironment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolves to an environment and prefers jest-environment-\`name\`", @@ -480,7 +564,7 @@ TestRunResult { }, TestGroupResult { "name": "babel-jest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "correctly identifies and uses babel-jest", @@ -497,7 +581,7 @@ TestRunResult { }, TestGroupResult { "name": "Upgrade help", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "logs a warning when \`scriptPreprocessor\` and/or \`preprocessorIgnorePatterns\` are used", @@ -508,7 +592,7 @@ TestRunResult { }, TestGroupResult { "name": "testRegex", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testRegex empty string is mapped to empty array", @@ -531,7 +615,7 @@ TestRunResult { }, TestGroupResult { "name": "testMatch", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testMatch default not applied if testRegex is set", @@ -560,7 +644,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleDirectories", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to node_modules", @@ -577,7 +661,7 @@ TestRunResult { }, TestGroupResult { "name": "preset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws when preset not found", @@ -586,7 +670,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "throws when module was found but no \\"jest-preset.js\\" or \\"jest-preset.json\\" files", + "name": "throws when module was found but no "jest-preset.js" or "jest-preset.json" files", "result": "success", "time": 1, }, @@ -610,7 +694,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "works with \\"react-native\\"", + "name": "works with "react-native"", "result": "success", "time": 3, }, @@ -648,7 +732,7 @@ TestRunResult { }, TestGroupResult { "name": "preset with globals", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should merge the globals preset correctly", @@ -659,7 +743,7 @@ TestRunResult { }, TestGroupResult { "name": "preset without setupFiles", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should normalize setupFiles correctly", @@ -670,7 +754,7 @@ TestRunResult { }, TestGroupResult { "name": "preset without setupFilesAfterEnv", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should normalize setupFilesAfterEnv correctly", @@ -681,7 +765,7 @@ TestRunResult { }, TestGroupResult { "name": "runner", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to \`jest-runner\`", @@ -710,7 +794,7 @@ TestRunResult { }, TestGroupResult { "name": "watchPlugins", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to undefined", @@ -745,7 +829,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to empty", @@ -768,7 +852,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern --testPathPattern", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses --testPathPattern if set", @@ -791,7 +875,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern --testPathPattern posix", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not escape the pattern", @@ -802,10 +886,10 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern --testPathPattern win32", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "preserves any use of \\"\\\\\\"", + "name": "preserves any use of "\\"", "result": "success", "time": 1, }, @@ -831,7 +915,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern ", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses if set", @@ -854,7 +938,7 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern posix", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not escape the pattern", @@ -865,10 +949,10 @@ TestRunResult { }, TestGroupResult { "name": "testPathPattern win32", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "preserves any use of \\"\\\\\\"", + "name": "preserves any use of "\\"", "result": "success", "time": 15, }, @@ -894,7 +978,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleFileExtensions", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to something useful", @@ -917,7 +1001,7 @@ TestRunResult { }, TestGroupResult { "name": "cwd", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is set to process.cwd", @@ -934,7 +1018,7 @@ TestRunResult { }, TestGroupResult { "name": "Defaults", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be accepted by normalize", @@ -945,7 +1029,7 @@ TestRunResult { }, TestGroupResult { "name": "displayName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw an error when displayName is is an empty object", @@ -1004,7 +1088,7 @@ TestRunResult { }, TestGroupResult { "name": "testTimeout", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return timeout value if defined", @@ -1021,7 +1105,7 @@ TestRunResult { }, TestGroupResult { "name": "extensionsToTreatAsEsm", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass valid config through", @@ -1059,10 +1143,10 @@ TestRunResult { "totalTime": 798, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Repl cli", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs without errors", @@ -1076,10 +1160,10 @@ TestRunResult { "totalTime": 1172, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "chalk", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "level 0", @@ -1108,7 +1192,7 @@ TestRunResult { }, TestGroupResult { "name": "matcher error toMatchInlineSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Expected properties must be an object (non-null) without snapshot", @@ -1137,7 +1221,7 @@ TestRunResult { }, TestGroupResult { "name": "matcher error toMatchSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Expected properties must be an object (non-null)", @@ -1166,7 +1250,7 @@ TestRunResult { }, TestGroupResult { "name": "matcher error toMatchSnapshot received value must be an object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(non-null)", @@ -1183,7 +1267,7 @@ TestRunResult { }, TestGroupResult { "name": "matcher error toThrowErrorMatchingInlineSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Inline snapshot must be a string", @@ -1200,7 +1284,7 @@ TestRunResult { }, TestGroupResult { "name": "matcher error toThrowErrorMatchingSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Received value must be a function", @@ -1217,7 +1301,7 @@ TestRunResult { }, TestGroupResult { "name": "other error toThrowErrorMatchingSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Received function did not throw", @@ -1228,7 +1312,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toMatchInlineSnapshot with properties equals false", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "with snapshot", @@ -1245,7 +1329,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toMatchInlineSnapshot with properties", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "equals true", @@ -1256,7 +1340,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toMatchSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "New snapshot was not written (multi line)", @@ -1273,7 +1357,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toMatchSnapshot with properties equals false", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isLineDiffable false", @@ -1290,7 +1374,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toMatchSnapshot with properties", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "equals true", @@ -1301,7 +1385,7 @@ TestRunResult { }, TestGroupResult { "name": "pass false toThrowErrorMatchingInlineSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "with snapshot", @@ -1312,7 +1396,7 @@ TestRunResult { }, TestGroupResult { "name": "pass true toMatchSnapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "without properties", @@ -1323,7 +1407,7 @@ TestRunResult { }, TestGroupResult { "name": "printPropertiesAndReceived", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "omit missing properties", @@ -1334,7 +1418,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived backtick", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "single line expected and received", @@ -1345,7 +1429,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived empty string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "expected and received single line", @@ -1362,7 +1446,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived escape", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "double quote marks in string", @@ -1391,7 +1475,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived expand", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "false", @@ -1408,7 +1492,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fallback to line diff", @@ -1437,7 +1521,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived has no common after clean up chaff", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "array", @@ -1454,7 +1538,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived MAX_DIFF_STRING_LENGTH unquoted", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "both are less", @@ -1477,7 +1561,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived MAX_DIFF_STRING_LENGTH quoted", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "both are less", @@ -1500,7 +1584,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived isLineDiffable false", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "asymmetric matcher", @@ -1541,7 +1625,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived isLineDiffable true", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "array", @@ -1570,7 +1654,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived ignore indentation", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "markup delete", @@ -1593,7 +1677,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived ignore indentation object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "delete", @@ -1610,7 +1694,7 @@ TestRunResult { }, TestGroupResult { "name": "printSnapshotAndReceived without serialize", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "backtick single line expected and received", @@ -1648,10 +1732,10 @@ TestRunResult { "totalTime": 1188, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "get configuration defaults", @@ -1665,10 +1749,10 @@ TestRunResult { "totalTime": 672, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "isCoreModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns false if \`hasCoreModules\` is false.", @@ -1697,7 +1781,7 @@ TestRunResult { }, TestGroupResult { "name": "findNodeModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is possible to override the default resolver", @@ -1714,7 +1798,7 @@ TestRunResult { }, TestGroupResult { "name": "resolveModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is possible to resolve node modules", @@ -1755,7 +1839,7 @@ TestRunResult { }, TestGroupResult { "name": "getMockModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is possible to use custom resolver to resolve deps inside mock modules with moduleNameMapper", @@ -1766,7 +1850,7 @@ TestRunResult { }, TestGroupResult { "name": "nodeModulesPaths", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "provides custom module paths after node_modules", @@ -1777,16 +1861,16 @@ TestRunResult { }, TestGroupResult { "name": "Resolver.getModulePaths() -> nodeModulesPaths()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "can resolve node modules relative to absolute paths in \\"moduleDirectories\\" on Windows platforms", + "name": "can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms", "result": "success", "time": 21, }, TestCaseResult { "error": undefined, - "name": "can resolve node modules relative to absolute paths in \\"moduleDirectories\\" on Posix platforms", + "name": "can resolve node modules relative to absolute paths in "moduleDirectories" on Posix platforms", "result": "success", "time": 8, }, @@ -1797,10 +1881,10 @@ TestRunResult { "totalTime": 1308, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toEqual", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be reflexive", @@ -1820,10 +1904,10 @@ TestRunResult { "totalTime": 1062, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "snapshots needs update with npm test", @@ -1855,10 +1939,10 @@ TestRunResult { "totalTime": 366, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "readConfigs() throws when called without project paths", @@ -1884,10 +1968,10 @@ TestRunResult { "totalTime": 135, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "generateEmptyCoverage", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "generates an empty coverage object for a file without running it", @@ -1913,10 +1997,10 @@ TestRunResult { "totalTime": 1129, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Any.asymmetricMatch()", @@ -2152,10 +2236,10 @@ TestRunResult { "totalTime": 207, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "onRunComplete", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "getLastError() returns an error when threshold is not met for global", @@ -2240,10 +2324,10 @@ TestRunResult { "totalTime": 397, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "saveInlineSnapshots() replaces empty function call with a template literal", @@ -2383,10 +2467,10 @@ TestRunResult { "totalTime": 1149, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "readConfig() throws when an object is passed without a file path", @@ -2400,10 +2484,10 @@ TestRunResult { "totalTime": 76, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "When offset is -1", @@ -2441,10 +2525,10 @@ TestRunResult { "totalTime": 57, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toThrowError", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "to throw or not to throw", @@ -2467,7 +2551,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError substring", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2514,7 +2598,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError regexp", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2555,7 +2639,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError error class", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2602,7 +2686,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError error-message pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2619,7 +2703,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError error-message fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2642,7 +2726,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric any-Class pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2659,7 +2743,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric any-Class fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2676,7 +2760,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric anything pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2693,7 +2777,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric anything fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2710,7 +2794,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric no-symbol pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2727,7 +2811,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric no-symbol fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2744,7 +2828,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric objectContaining pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2761,7 +2845,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError asymmetric objectContaining fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2778,7 +2862,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError promise/async throws if Error-like object is returned", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2807,7 +2891,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrowError expected is undefined", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "threw, but should not have (non-error falsey)", @@ -2818,7 +2902,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "to throw or not to throw", @@ -2841,7 +2925,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow substring", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2888,7 +2972,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow regexp", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2929,7 +3013,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow error class", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -2976,7 +3060,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow error-message pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -2993,7 +3077,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow error-message fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3016,7 +3100,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric any-Class pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3033,7 +3117,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric any-Class fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3050,7 +3134,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric anything pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3067,7 +3151,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric anything fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3084,7 +3168,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric no-symbol pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3101,7 +3185,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric no-symbol fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3118,7 +3202,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric objectContaining pass", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3135,7 +3219,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow asymmetric objectContaining fail", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -3152,7 +3236,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow promise/async throws if Error-like object is returned", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes", @@ -3181,7 +3265,7 @@ TestRunResult { }, TestGroupResult { "name": "toThrow expected is undefined", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "threw, but should not have (non-error falsey)", @@ -3195,10 +3279,10 @@ TestRunResult { "totalTime": 257, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "recursively validates default Jest config", @@ -3333,7 +3417,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "Comments in config JSON using \\"//\\" key are not warned", + "name": "Comments in config JSON using "//" key are not warned", "result": "success", "time": 0, }, @@ -3344,10 +3428,10 @@ TestRunResult { "totalTime": 283, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "defaults", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns cached object if called multiple times", @@ -3370,7 +3454,7 @@ TestRunResult { }, TestGroupResult { "name": "custom resolver in project config", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns cached object if called multiple times", @@ -3393,7 +3477,7 @@ TestRunResult { }, TestGroupResult { "name": "malformed custom resolver in project config", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "missing resolveSnapshotPath throws", @@ -3425,10 +3509,10 @@ TestRunResult { "totalTime": 98, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolves to the result of generateEmptyCoverage upon success", @@ -3448,10 +3532,10 @@ TestRunResult { "totalTime": 199, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Returns source string with inline maps when no transformOptions is passed", @@ -3468,28 +3552,28 @@ TestRunResult { }, TestGroupResult { "name": "caller option correctly merges from defaults and options", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "{\\"supportsDynamicImport\\":true,\\"supportsStaticESM\\":true} -> {\\"supportsDynamicImport\\":true,\\"supportsStaticESM\\":true}", + "name": "{"supportsDynamicImport":true,"supportsStaticESM":true} -> {"supportsDynamicImport":true,"supportsStaticESM":true}", "result": "success", "time": 6, }, TestCaseResult { "error": undefined, - "name": "{\\"supportsDynamicImport\\":false,\\"supportsStaticESM\\":false} -> {\\"supportsDynamicImport\\":false,\\"supportsStaticESM\\":false}", + "name": "{"supportsDynamicImport":false,"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false}", "result": "success", "time": 11, }, TestCaseResult { "error": undefined, - "name": "{\\"supportsStaticESM\\":false} -> {\\"supportsDynamicImport\\":false,\\"supportsStaticESM\\":false}", + "name": "{"supportsStaticESM":false} -> {"supportsDynamicImport":false,"supportsStaticESM":false}", "result": "success", "time": 13, }, TestCaseResult { "error": undefined, - "name": "{\\"supportsDynamicImport\\":true} -> {\\"supportsDynamicImport\\":true,\\"supportsStaticESM\\":false}", + "name": "{"supportsDynamicImport":true} -> {"supportsDynamicImport":true,"supportsStaticESM":false}", "result": "success", "time": 11, }, @@ -3500,19 +3584,19 @@ TestRunResult { "totalTime": 371, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Resolve config path .js", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "file path with \\".js\\"", + "name": "file path with ".js"", "result": "success", "time": 9, }, TestCaseResult { "error": undefined, - "name": "directory path with \\".js\\"", + "name": "directory path with ".js"", "result": "success", "time": 11, }, @@ -3520,16 +3604,16 @@ TestRunResult { }, TestGroupResult { "name": "Resolve config path .ts", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "file path with \\".ts\\"", + "name": "file path with ".ts"", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "directory path with \\".ts\\"", + "name": "directory path with ".ts"", "result": "success", "time": 3, }, @@ -3537,16 +3621,16 @@ TestRunResult { }, TestGroupResult { "name": "Resolve config path .mjs", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "file path with \\".mjs\\"", + "name": "file path with ".mjs"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "directory path with \\".mjs\\"", + "name": "directory path with ".mjs"", "result": "success", "time": 7, }, @@ -3554,16 +3638,16 @@ TestRunResult { }, TestGroupResult { "name": "Resolve config path .cjs", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "file path with \\".cjs\\"", + "name": "file path with ".cjs"", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "directory path with \\".cjs\\"", + "name": "directory path with ".cjs"", "result": "success", "time": 2, }, @@ -3571,16 +3655,16 @@ TestRunResult { }, TestGroupResult { "name": "Resolve config path .json", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "file path with \\".json\\"", + "name": "file path with ".json"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "directory path with \\".json\\"", + "name": "directory path with ".json"", "result": "success", "time": 3, }, @@ -3591,10 +3675,10 @@ TestRunResult { "totalTime": 183, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "groupTestsBySuites", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should handle empty results", @@ -3668,10 +3752,10 @@ TestRunResult { "totalTime": 425, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "keyToTestName()", @@ -3740,7 +3824,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "serialize handles \\\\r\\\\n", + "name": "serialize handles \\r\\n", "result": "success", "time": 1, }, @@ -3748,7 +3832,7 @@ TestRunResult { }, TestGroupResult { "name": "ExtraLineBreaks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "0 empty string", @@ -3795,7 +3879,7 @@ TestRunResult { }, TestGroupResult { "name": "removeLinesBeforeExternalMatcherTrap", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "contains external matcher trap", @@ -3812,7 +3896,7 @@ TestRunResult { }, TestGroupResult { "name": "DeepMerge with property matchers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Correctly merges a nested object", @@ -3850,10 +3934,10 @@ TestRunResult { "totalTime": 214, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test always", @@ -3948,7 +4032,7 @@ TestRunResult { }, TestGroupResult { "name": "node-notifier is an optional dependency", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "without node-notifier uses mock function that throws an error", @@ -3974,10 +4058,10 @@ TestRunResult { "totalTime": 166, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime CLI", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails with no path", @@ -4009,10 +4093,10 @@ TestRunResult { "totalTime": 4094.0000000000005, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is available globally when matcher is unary", @@ -4080,10 +4164,10 @@ TestRunResult { "totalTime": 99, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getCallsite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "without source map", @@ -4109,10 +4193,10 @@ TestRunResult { "totalTime": 86, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "maps special values to valid options", @@ -4144,10 +4228,10 @@ TestRunResult { "totalTime": 53, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls handler on change value", @@ -4173,10 +4257,10 @@ TestRunResult { "totalTime": 91, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "docblock", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "extracts valid docblock with line comment", @@ -4400,10 +4484,10 @@ TestRunResult { "totalTime": 177, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "dedentLines non-null", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "no lines", @@ -4456,7 +4540,7 @@ TestRunResult { }, TestGroupResult { "name": "dedentLines null", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "object key multi-line", @@ -4518,10 +4602,10 @@ TestRunResult { "totalTime": 94, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getMaxWorkers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Returns 1 when runInBand", @@ -4550,7 +4634,7 @@ TestRunResult { }, TestGroupResult { "name": "getMaxWorkers % based", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "50% = 2 workers", @@ -4576,10 +4660,10 @@ TestRunResult { "totalTime": 67, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "wrapAnsiString()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "wraps a long string containing ansi chars", @@ -4596,7 +4680,7 @@ TestRunResult { }, TestGroupResult { "name": "trimAndFormatPath()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "trims dirname", @@ -4631,7 +4715,7 @@ TestRunResult { }, TestGroupResult { "name": "printDisplayName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should default displayName color to white when displayName is a string", @@ -4657,10 +4741,10 @@ TestRunResult { "totalTime": 85, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throw matcher can take func", @@ -4671,7 +4755,7 @@ TestRunResult { }, TestGroupResult { "name": "throw matcher from promise", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "can take error", @@ -4691,10 +4775,10 @@ TestRunResult { "totalTime": 481, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "matcher returns matcher name, expected and actual values", @@ -4708,10 +4792,10 @@ TestRunResult { "totalTime": 131, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "validate pattern function", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "without passed args returns true", @@ -4743,10 +4827,10 @@ TestRunResult { "totalTime": 52, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "isBuiltinModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true for the \`path\` module", @@ -4778,10 +4862,10 @@ TestRunResult { "totalTime": 36, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throw when directly imported", @@ -4795,10 +4879,10 @@ TestRunResult { "totalTime": 533, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "replacePathSepForRegex() posix", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the path", @@ -4809,7 +4893,7 @@ TestRunResult { }, TestGroupResult { "name": "replacePathSepForRegex() win32", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should replace POSIX path separators", @@ -4859,10 +4943,10 @@ TestRunResult { "totalTime": 56, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mock with 0 calls and default name", @@ -4930,10 +5014,10 @@ TestRunResult { "totalTime": 45, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getWatermarks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "that watermarks use thresholds as upper target", @@ -4953,10 +5037,10 @@ TestRunResult { "totalTime": 37, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normal output, everything goes to stdout", @@ -4976,10 +5060,10 @@ TestRunResult { "totalTime": 148, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call \`terminal-link\` correctly", @@ -5011,10 +5095,10 @@ TestRunResult { "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toEqual duck type Text", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5031,7 +5115,7 @@ TestRunResult { }, TestGroupResult { "name": "toEqual duck type Element", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5048,7 +5132,7 @@ TestRunResult { }, TestGroupResult { "name": "toEqual duck type Fragment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5065,7 +5149,7 @@ TestRunResult { }, TestGroupResult { "name": "toEqual document createTextNode", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5082,7 +5166,7 @@ TestRunResult { }, TestGroupResult { "name": "toEqual document createElement", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5099,7 +5183,7 @@ TestRunResult { }, TestGroupResult { "name": "toEqual document createDocumentFragment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "isNot false", @@ -5119,10 +5203,10 @@ TestRunResult { "totalTime": 99, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "NodeEnvironment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses a copy of the process object", @@ -5166,10 +5250,10 @@ TestRunResult { "totalTime": 184, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Retrieves the snapshot status", @@ -5195,10 +5279,10 @@ TestRunResult { "totalTime": 28, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "validates yargs special options", @@ -5242,10 +5326,10 @@ TestRunResult { "totalTime": 83, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "creates a snapshot summary", @@ -5277,10 +5361,10 @@ TestRunResult { "totalTime": 49, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "for multiline test name returns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test name with highlighted pattern and replaced line breaks", @@ -5291,7 +5375,7 @@ TestRunResult { }, TestGroupResult { "name": "for one line test name with pattern in the head returns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test name with highlighted pattern", @@ -5314,7 +5398,7 @@ TestRunResult { }, TestGroupResult { "name": "for one line test name pattern in the middle", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test name with highlighted pattern returns", @@ -5343,7 +5427,7 @@ TestRunResult { }, TestGroupResult { "name": "for one line test name pattern in the tail returns", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test name with highlighted pattern", @@ -5369,10 +5453,10 @@ TestRunResult { "totalTime": 129, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "shouldInstrument should return true", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "when testRegex is provided and file is not a test file", @@ -5443,7 +5527,7 @@ TestRunResult { }, TestGroupResult { "name": "shouldInstrument should return false", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "if collectCoverage is falsy", @@ -5535,10 +5619,10 @@ TestRunResult { "totalTime": 155, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ScriptTransformer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "transforms a file properly", @@ -5678,10 +5762,10 @@ TestRunResult { "totalTime": 1660, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "simple test", @@ -5701,10 +5785,10 @@ TestRunResult { "totalTime": 2902, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "moduleMocker getMetadata", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the function \`name\` property", @@ -5769,7 +5853,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker generateFromMetadata", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "forwards the function name property", @@ -5972,7 +6056,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker generateFromMetadata mocked functions", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tracks calls to mocks", @@ -6043,7 +6127,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker generateFromMetadata return values", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tracks return values", @@ -6066,7 +6150,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker generateFromMetadata invocationCallOrder", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tracks invocationCallOrder made by mocks", @@ -6095,7 +6179,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker getMockImplementation", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should mock calls to a mock function", @@ -6106,7 +6190,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker mockImplementationOnce", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should mock constructor", @@ -6129,7 +6213,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mockReturnValue does not override mockImplementationOnce", @@ -6182,7 +6266,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker spyOn", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work", @@ -6211,7 +6295,7 @@ TestRunResult { }, TestGroupResult { "name": "moduleMocker spyOnProperty", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work - getter", @@ -6261,10 +6345,10 @@ TestRunResult { "totalTime": 509, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "beforeEach is executed before each test in current/child describe blocks", @@ -6290,10 +6374,10 @@ TestRunResult { "totalTime": 3762, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "finds haste modules", @@ -6454,7 +6538,7 @@ TestRunResult { }, TestGroupResult { "name": "Runtime requireModule on node >=12.12.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "overrides module.createRequire", @@ -6468,10 +6552,10 @@ TestRunResult { "totalTime": 2439, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime jest.mock", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses explicitly set mocks instead of automocking", @@ -6494,7 +6578,7 @@ TestRunResult { }, TestGroupResult { "name": "Runtime jest.setMock", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses explicitly set mocks instead of automocking", @@ -6508,10 +6592,10 @@ TestRunResult { "totalTime": 743, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "test/it error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "it doesn't throw an error with valid arguments", @@ -6567,10 +6651,10 @@ TestRunResult { "totalTime": 300, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "BaseWorkerPool", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when createWorker is not defined", @@ -6623,7 +6707,7 @@ TestRunResult { }, TestGroupResult { "name": "BaseWorkerPool end", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ends all workers", @@ -6649,10 +6733,10 @@ TestRunResult { "totalTime": 653, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not incorrectly match identity-obj-proxy as Immutable object", @@ -6663,7 +6747,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.OrderedSet", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -6740,7 +6824,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.List", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -6817,7 +6901,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Stack", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -6894,7 +6978,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Set", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -6971,7 +7055,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Map", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -7030,7 +7114,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.OrderedMap", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty collection {min: true}", @@ -7095,7 +7179,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Record", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty record {min: true}", @@ -7160,7 +7244,7 @@ TestRunResult { }, TestGroupResult { "name": "indentation of heterogeneous collections", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "empty Immutable.List as child of Object", @@ -7189,7 +7273,7 @@ TestRunResult { }, TestGroupResult { "name": "indent option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default implicit: 2 spaces", @@ -7218,7 +7302,7 @@ TestRunResult { }, TestGroupResult { "name": "maxDepth option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Immutable.List as child of Object", @@ -7247,7 +7331,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Seq", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports an empty sequence from array {min: true}", @@ -7336,7 +7420,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Seq lazy entries", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "from object properties", @@ -7353,7 +7437,7 @@ TestRunResult { }, TestGroupResult { "name": "Immutable.Seq lazy values", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "from Immutable.Range", @@ -7391,10 +7475,10 @@ TestRunResult { "totalTime": 443, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "installs source maps if available", @@ -7408,10 +7492,10 @@ TestRunResult { "totalTime": 584, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "JSDomEnvironment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should configure setTimeout/setInterval to use the browser api", @@ -7431,10 +7515,10 @@ TestRunResult { "totalTime": 783, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "babel-plugin-jest-hoist", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "automatic react runtime", @@ -7466,10 +7550,10 @@ TestRunResult { "totalTime": 347, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes fork options down to child_process.fork, adding the defaults", @@ -7579,10 +7663,10 @@ TestRunResult { "totalTime": 184, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "jest-each .test", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -7653,7 +7737,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -7724,7 +7808,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -7795,7 +7879,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -7890,7 +7974,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -7961,7 +8045,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8032,7 +8116,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .fit", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8103,7 +8187,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8174,7 +8258,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8245,7 +8329,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .fdescribe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8316,7 +8400,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with an array", @@ -8387,7 +8471,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each done callback", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls [ 'test' ] with done when cb function has more args than params of given test row", @@ -8452,7 +8536,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xtest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8481,7 +8565,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8510,7 +8594,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xit", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8539,7 +8623,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8568,7 +8652,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xdescribe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8597,7 +8681,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -8629,10 +8713,10 @@ TestRunResult { "totalTime": 192, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "jest-each .test", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -8751,7 +8835,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -8888,7 +8972,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9007,7 +9091,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.concurrent.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9144,7 +9228,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9263,7 +9347,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9382,7 +9466,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .fit", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9501,7 +9585,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9620,7 +9704,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9739,7 +9823,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .fdescribe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9858,7 +9942,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe.only", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error when there are additional words in first column heading", @@ -9977,7 +10061,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each done callback", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls [ 'test' ] with done when cb function has more args than params of given test row", @@ -10036,7 +10120,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xtest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10059,7 +10143,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .test.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10082,7 +10166,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xit", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10105,7 +10189,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .it.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10128,7 +10212,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .xdescribe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10151,7 +10235,7 @@ TestRunResult { }, TestGroupResult { "name": "jest-each .describe.skip", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls global with given title", @@ -10177,10 +10261,10 @@ TestRunResult { "totalTime": 483, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports a single element with no props or children", @@ -10393,7 +10477,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "throws if theme option is not of type \\"object\\"", + "name": "throws if theme option is not of type "object"", "result": "success", "time": 0, }, @@ -10449,7 +10533,7 @@ TestRunResult { }, TestGroupResult { "name": "test object for subset match", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "undefined props", @@ -10466,7 +10550,7 @@ TestRunResult { }, TestGroupResult { "name": "indent option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default implicit: 2 spaces", @@ -10495,7 +10579,7 @@ TestRunResult { }, TestGroupResult { "name": "maxDepth option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "elements", @@ -10512,7 +10596,7 @@ TestRunResult { }, TestGroupResult { "name": "React.memo without displayName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders the component name", @@ -10523,7 +10607,7 @@ TestRunResult { }, TestGroupResult { "name": "React.memo with displayName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders the displayName of component before memoizing", @@ -10543,10 +10627,10 @@ TestRunResult { "totalTime": 325, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tests are not marked done until their parent afterAll runs", @@ -10590,10 +10674,10 @@ TestRunResult { "totalTime": 5755, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "prettyFormat()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints empty arguments", @@ -11072,7 +11156,7 @@ TestRunResult { }, TestGroupResult { "name": "prettyFormat() indent option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default implicit: 2 spaces", @@ -11101,7 +11185,7 @@ TestRunResult { }, TestGroupResult { "name": "prettyFormat() min", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints some basic values in min mode", @@ -11127,10 +11211,10 @@ TestRunResult { "totalTime": 219, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Farm", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "sends a request to one worker", @@ -11198,10 +11282,10 @@ TestRunResult { "totalTime": 158, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "lazily requires the file", @@ -11228,13 +11312,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "calls the main module if the method call is \\"default\\"", + "name": "calls the main module if the method call is "default"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "calls the main export if the method call is \\"default\\" and it is a Babel transpiled one", + "name": "calls the main export if the method call is "default" and it is a Babel transpiled one", "result": "success", "time": 1, }, @@ -11269,10 +11353,10 @@ TestRunResult { "totalTime": 120, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "queueRunner", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs every function in the queue.", @@ -11316,10 +11400,10 @@ TestRunResult { "totalTime": 93, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passes fork options down to child_process.fork, adding the defaults", @@ -11417,10 +11501,10 @@ TestRunResult { "totalTime": 258, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "lazily requires the file", @@ -11447,13 +11531,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "calls the main module if the method call is \\"default\\"", + "name": "calls the main module if the method call is "default"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "calls the main export if the method call is \\"default\\" and it is a Babel transpiled one", + "name": "calls the main export if the method call is "default" and it is a Babel transpiled one", "result": "success", "time": 1, }, @@ -11488,10 +11572,10 @@ TestRunResult { "totalTime": 135, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "injects the serializable module map into each worker in watch mode", @@ -11511,13 +11595,13 @@ TestRunResult { "totalTime": 905, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "beforeEach hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "beforeEach throws an error when \\"String\\" is provided as a first argument to it", + "name": "beforeEach throws an error when "String" is provided as a first argument to it", "result": "success", "time": 19, }, @@ -11567,10 +11651,10 @@ TestRunResult { }, TestGroupResult { "name": "beforeAll hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "beforeAll throws an error when \\"String\\" is provided as a first argument to it", + "name": "beforeAll throws an error when "String" is provided as a first argument to it", "result": "success", "time": 0, }, @@ -11620,10 +11704,10 @@ TestRunResult { }, TestGroupResult { "name": "afterEach hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "afterEach throws an error when \\"String\\" is provided as a first argument to it", + "name": "afterEach throws an error when "String" is provided as a first argument to it", "result": "success", "time": 0, }, @@ -11673,10 +11757,10 @@ TestRunResult { }, TestGroupResult { "name": "afterAll hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "afterAll throws an error when \\"String\\" is provided as a first argument to it", + "name": "afterAll throws an error when "String" is provided as a first argument to it", "result": "success", "time": 1, }, @@ -11729,10 +11813,10 @@ TestRunResult { "totalTime": 127, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Using V8 implementation", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws the error with an invalid serialization", @@ -11743,7 +11827,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11760,7 +11844,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11777,7 +11861,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 2", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11794,7 +11878,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 3", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11811,7 +11895,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 4", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11828,7 +11912,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 5", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11845,7 +11929,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 6", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11862,7 +11946,7 @@ TestRunResult { }, TestGroupResult { "name": "Using V8 implementation Object 7", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes/deserializes in memory", @@ -11882,10 +11966,10 @@ TestRunResult { "totalTime": 158, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "CustomConsole assert", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "do not log when the assertion is truthy", @@ -11914,7 +11998,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole count", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "count using the default counter", @@ -11943,7 +12027,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole group", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "group without label", @@ -11972,7 +12056,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole time", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the time between time() and timeEnd() on default timer", @@ -11989,7 +12073,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole dir", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should print the deepest value", @@ -12000,7 +12084,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole timeLog", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the time between time() and timeEnd() on default timer", @@ -12029,7 +12113,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole console", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be able to initialize console instance", @@ -12043,10 +12127,10 @@ TestRunResult { "totalTime": 171, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "CustomConsole log", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should print to stdout", @@ -12057,7 +12141,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should print to stderr", @@ -12068,7 +12152,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole warn", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should print to stderr", @@ -12079,7 +12163,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole assert", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "do not log when the assertion is truthy", @@ -12108,7 +12192,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole count", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "count using the default counter", @@ -12137,7 +12221,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole group", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "group without label", @@ -12166,7 +12250,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole time", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the time between time() and timeEnd() on default timer", @@ -12183,7 +12267,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole dir", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should print the deepest value", @@ -12194,7 +12278,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole timeLog", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the time between time() and timeEnd() on default timer", @@ -12223,7 +12307,7 @@ TestRunResult { }, TestGroupResult { "name": "CustomConsole console", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be able to initialize console instance", @@ -12237,10 +12321,10 @@ TestRunResult { "totalTime": 115, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "DOMCollection plugin for object properties", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports DOMStringMap", @@ -12263,7 +12347,7 @@ TestRunResult { }, TestGroupResult { "name": "DOMCollection plugin for list items", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports HTMLCollection for getElementsByTagName", @@ -12313,10 +12397,10 @@ TestRunResult { "totalTime": 64, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "test/it.todo error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "todo throws error when given no arguments", @@ -12342,10 +12426,10 @@ TestRunResult { "totalTime": 81, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "sorts by file size if there is no timing information", @@ -12401,10 +12485,10 @@ TestRunResult { "totalTime": 251, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "doesn't throw on addExpectationResult when there are no children", @@ -12418,10 +12502,10 @@ TestRunResult { "totalTime": 84, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports any(String)", @@ -12618,7 +12702,7 @@ TestRunResult { }, TestGroupResult { "name": "indent option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "default implicit: 2 spaces", @@ -12647,7 +12731,7 @@ TestRunResult { }, TestGroupResult { "name": "maxDepth option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "matchers as leaf nodes", @@ -12667,10 +12751,10 @@ TestRunResult { "totalTime": 137, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ConvertAnsi plugin", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports style.red", @@ -12714,10 +12798,10 @@ TestRunResult { "totalTime": 43, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getConsoleOutput", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "takes noStackTrace and pass it on for assert", @@ -12797,10 +12881,10 @@ TestRunResult { "totalTime": 56, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "expectationResultFactory", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the result if passed.", @@ -12850,10 +12934,10 @@ TestRunResult { "totalTime": 70, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "array .add", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the result of adding 0 to 0", @@ -12876,7 +12960,7 @@ TestRunResult { }, TestGroupResult { "name": "concurrent .add", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the result of adding 0 to 0", @@ -12899,7 +12983,7 @@ TestRunResult { }, TestGroupResult { "name": "template .add", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns 0 when given 0 and 0", @@ -12922,7 +13006,7 @@ TestRunResult { }, TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when not called with the right number of arguments", @@ -12936,10 +13020,10 @@ TestRunResult { "totalTime": 44, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "pretty-format", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints global window as constructor name alone", @@ -12950,7 +13034,7 @@ TestRunResult { }, TestGroupResult { "name": "DOMElement Plugin", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports a single HTML element", @@ -13105,7 +13189,7 @@ TestRunResult { }, TestGroupResult { "name": "DOMElement Plugin matches constructor name of SVG elements", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "jsdom 9 and 10", @@ -13125,10 +13209,10 @@ TestRunResult { "totalTime": 148, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "formatTestResults", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "includes test full name", @@ -13142,10 +13226,10 @@ TestRunResult { "totalTime": 53, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exposes the right API using default working", @@ -13201,13 +13285,13 @@ TestRunResult { "totalTime": 230, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "beforeEach hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "beforeEach throws an error when \\"String\\" is provided as a first argument to it", + "name": "beforeEach throws an error when "String" is provided as a first argument to it", "result": "success", "time": 2, }, @@ -13257,10 +13341,10 @@ TestRunResult { }, TestGroupResult { "name": "beforeAll hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "beforeAll throws an error when \\"String\\" is provided as a first argument to it", + "name": "beforeAll throws an error when "String" is provided as a first argument to it", "result": "success", "time": 0, }, @@ -13310,10 +13394,10 @@ TestRunResult { }, TestGroupResult { "name": "afterEach hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "afterEach throws an error when \\"String\\" is provided as a first argument to it", + "name": "afterEach throws an error when "String" is provided as a first argument to it", "result": "success", "time": 0, }, @@ -13363,10 +13447,10 @@ TestRunResult { }, TestGroupResult { "name": "afterAll hooks error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "afterAll throws an error when \\"String\\" is provided as a first argument to it", + "name": "afterAll throws an error when "String" is provided as a first argument to it", "result": "success", "time": 1, }, @@ -13419,10 +13503,10 @@ TestRunResult { "totalTime": 51, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Jasmine2Reporter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "reports nested suites", @@ -13436,10 +13520,10 @@ TestRunResult { "totalTime": 107, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "test/it.todo error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "it throws error when given no arguments", @@ -13465,10 +13549,10 @@ TestRunResult { "totalTime": 27, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "test/it error throwing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "it throws error with missing callback function", @@ -13512,10 +13596,10 @@ TestRunResult { "totalTime": 32, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "iterators", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works for arrays", @@ -13547,10 +13631,10 @@ TestRunResult { "totalTime": 43, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "pTimeout", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls \`clearTimeout\` and resolves when \`promise\` resolves.", @@ -13576,10 +13660,10 @@ TestRunResult { "totalTime": 44, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "creation of a cache key", @@ -13593,10 +13677,10 @@ TestRunResult { "totalTime": 75, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "concurrent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add 1 to number", @@ -13622,10 +13706,10 @@ TestRunResult { "totalTime": 24, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "global.test", @@ -13639,10 +13723,10 @@ TestRunResult { "totalTime": 23, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ReactElement Plugin", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "serializes forwardRef without displayName", @@ -13668,10 +13752,10 @@ TestRunResult { "totalTime": 64, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the shared tasks in FIFO ordering", @@ -13697,10 +13781,10 @@ TestRunResult { "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the tasks in order", @@ -13738,10 +13822,10 @@ TestRunResult { "totalTime": 63, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "SearchSource isTestFilePath", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports ../ paths and unix separators via testRegex", @@ -13764,7 +13848,7 @@ TestRunResult { }, TestGroupResult { "name": "SearchSource testPathsMatching", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "finds tests matching a pattern via testRegex", @@ -13847,7 +13931,7 @@ TestRunResult { }, TestGroupResult { "name": "SearchSource findRelatedTests", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "makes sure a file is related to itself", @@ -13870,7 +13954,7 @@ TestRunResult { }, TestGroupResult { "name": "SearchSource findRelatedTestsFromPattern", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns empty search result for empty input", @@ -13911,7 +13995,7 @@ TestRunResult { }, TestGroupResult { "name": "SearchSource findRelatedSourcesFromTestsInChangedFiles", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "return empty set if no SCM", @@ -13931,10 +14015,10 @@ TestRunResult { "totalTime": 2596, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw if passed two arguments", @@ -13945,7 +14029,7 @@ TestRunResult { }, TestGroupResult { "name": ".rejects", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -13966,13 +14050,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails non-promise value \\"a\\" synchronously", + "name": "fails non-promise value "a" synchronously", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "fails non-promise value \\"a\\"", + "name": "fails non-promise value "a"", "result": "success", "time": 2, }, @@ -14002,13 +14086,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails non-promise value {\\"a\\": 1} synchronously", + "name": "fails non-promise value {"a": 1} synchronously", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "fails non-promise value {\\"a\\": 1}", + "name": "fails non-promise value {"a": 1}", "result": "success", "time": 0, }, @@ -14070,7 +14154,7 @@ TestRunResult { }, TestGroupResult { "name": ".resolves", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should resolve", @@ -14079,13 +14163,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails non-promise value \\"a\\" synchronously", + "name": "fails non-promise value "a" synchronously", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "fails non-promise value \\"a\\"", + "name": "fails non-promise value "a"", "result": "success", "time": 0, }, @@ -14115,13 +14199,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails non-promise value {\\"a\\": 1} synchronously", + "name": "fails non-promise value {"a": 1} synchronously", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "fails non-promise value {\\"a\\": 1}", + "name": "fails non-promise value {"a": 1}", "result": "success", "time": 0, }, @@ -14183,7 +14267,7 @@ TestRunResult { }, TestGroupResult { "name": ".toBe()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not throw", @@ -14216,25 +14300,25 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails for: {\\"a\\": 1} and {\\"a\\": 1}", + "name": "fails for: {"a": 1} and {"a": 1}", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "fails for: {\\"a\\": 1} and {\\"a\\": 5}", + "name": "fails for: {"a": 1} and {"a": 5}", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "fails for: {\\"a\\": [Function a], \\"b\\": 2} and {\\"a\\": Any, \\"b\\": 2}", + "name": "fails for: {"a": [Function a], "b": 2} and {"a": Any, "b": 2}", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "fails for: {\\"a\\": undefined, \\"b\\": 2} and {\\"b\\": 2}", + "name": "fails for: {"a": undefined, "b": 2} and {"b": 2}", "result": "success", "time": 8, }, @@ -14270,37 +14354,37 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "fails for: \\"abc\\" and \\"cde\\"", + "name": "fails for: "abc" and "cde"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "fails for: \\"painless JavaScript testing\\" and \\"delightful JavaScript testing\\"", + "name": "fails for: "painless JavaScript testing" and "delightful JavaScript testing"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "fails for: \\"\\" and \\"compare one-line string to empty string\\"", + "name": "fails for: "" and "compare one-line string to empty string"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "fails for: \\"with -trailing space\\" and \\"without trailing space\\"", + "name": "fails for: "with +trailing space" and "without trailing space"", "result": "success", "time": 8, }, TestCaseResult { "error": undefined, - "name": "fails for: \\"four + "name": "fails for: "four 4 line -string\\" and \\"3 +string" and "3 line -string\\"", +string"", "result": "success", "time": 0, }, @@ -14330,7 +14414,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "fails for: {\\"a\\": 1n} and {\\"a\\": 1n}", + "name": "fails for: {"a": 1n} and {"a": 1n}", "result": "success", "time": 0, }, @@ -14348,7 +14432,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "fails for '\\"a\\"' with '.not'", + "name": "fails for '"a"' with '.not'", "result": "success", "time": 0, }, @@ -14404,7 +14488,7 @@ string\\"", }, TestGroupResult { "name": ".toStrictEqual()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not ignore keys with undefined values", @@ -14481,7 +14565,7 @@ string\\"", }, TestGroupResult { "name": ".toEqual()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: false} expect(true).toEqual(false)", @@ -14532,13 +14616,13 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abc\\").toEqual({\\"0\\": \\"a\\", \\"1\\": \\"b\\", \\"2\\": \\"c\\"})", + "name": "{pass: false} expect("abc").toEqual({"0": "a", "1": "b", "2": "c"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"0\\": \\"a\\", \\"1\\": \\"b\\", \\"2\\": \\"c\\"}).toEqual(\\"abc\\")", + "name": "{pass: false} expect({"0": "a", "1": "b", "2": "c"}).toEqual("abc")", "result": "success", "time": 1, }, @@ -14550,75 +14634,75 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 1}).toEqual({\\"a\\": 2})", + "name": "{pass: false} expect({"a": 1}).toEqual({"a": 2})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 5}).toEqual({\\"b\\": 6})", + "name": "{pass: false} expect({"a": 5}).toEqual({"b": 6})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"foo\\": {\\"bar\\": 1}}).toEqual({\\"foo\\": {}})", + "name": "{pass: false} expect({"foo": {"bar": 1}}).toEqual({"foo": {}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"getterAndSetter\\": {}}).toEqual({\\"getterAndSetter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"getterAndSetter": {}}).toEqual({"getterAndSetter": {"foo": "bar"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"frozenGetterAndSetter\\": {}}).toEqual({\\"frozenGetterAndSetter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"frozenGetterAndSetter": {}}).toEqual({"frozenGetterAndSetter": {"foo": "bar"}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"getter\\": {}}).toEqual({\\"getter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"getter": {}}).toEqual({"getter": {"foo": "bar"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"frozenGetter\\": {}}).toEqual({\\"frozenGetter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"frozenGetter": {}}).toEqual({"frozenGetter": {"foo": "bar"}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"setter\\": undefined}).toEqual({\\"setter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"setter": undefined}).toEqual({"setter": {"foo": "bar"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"frozenSetter\\": undefined}).toEqual({\\"frozenSetter\\": {\\"foo\\": \\"bar\\"}})", + "name": "{pass: false} expect({"frozenSetter": undefined}).toEqual({"frozenSetter": {"foo": "bar"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"banana\\").toEqual(\\"apple\\")", + "name": "{pass: false} expect("banana").toEqual("apple")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"1 234,57 $\\").toEqual(\\"1 234,57 $\\")", + "name": "{pass: false} expect("1 234,57 $").toEqual("1 234,57 $")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"type TypeName = T extends Function ? \\\\\\"function\\\\\\" : \\\\\\"object\\\\\\";\\").toEqual(\\"type TypeName = T extends Function -? \\\\\\"function\\\\\\" -: \\\\\\"object\\\\\\";\\")", + "name": "{pass: false} expect("type TypeName = T extends Function ? \\"function\\" : \\"object\\";").toEqual("type TypeName = T extends Function +? \\"function\\" +: \\"object\\";")", "result": "success", "time": 1, }, @@ -14708,55 +14792,55 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Map {1 => \\"one\\", 2 => \\"two\\"}).toEqual(Map {1 => \\"one\\"})", + "name": "{pass: false} expect(Map {1 => "one", 2 => "two"}).toEqual(Map {1 => "one"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Map {\\"a\\" => 0}).toEqual(Map {\\"b\\" => 0})", + "name": "{pass: false} expect(Map {"a" => 0}).toEqual(Map {"b" => 0})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Map {\\"v\\" => 1}).toEqual(Map {\\"v\\" => 2})", + "name": "{pass: false} expect(Map {"v" => 1}).toEqual(Map {"v" => 2})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Map {[\\"v\\"] => 1}).toEqual(Map {[\\"v\\"] => 2})", + "name": "{pass: false} expect(Map {["v"] => 1}).toEqual(Map {["v"] => 2})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Map {[1] => Map {[1] => \\"one\\"}}).toEqual(Map {[1] => Map {[1] => \\"two\\"}})", + "name": "{pass: false} expect(Map {[1] => Map {[1] => "one"}}).toEqual(Map {[1] => Map {[1] => "two"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Immutable.Map {\\"a\\": 0}).toEqual(Immutable.Map {\\"b\\": 0})", + "name": "{pass: false} expect(Immutable.Map {"a": 0}).toEqual(Immutable.Map {"b": 0})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Immutable.Map {\\"v\\": 1}).toEqual(Immutable.Map {\\"v\\": 2})", + "name": "{pass: false} expect(Immutable.Map {"v": 1}).toEqual(Immutable.Map {"v": 2})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Immutable.OrderedMap {1: \\"one\\", 2: \\"two\\"}).toEqual(Immutable.OrderedMap {2: \\"two\\", 1: \\"one\\"})", + "name": "{pass: false} expect(Immutable.OrderedMap {1: "one", 2: "two"}).toEqual(Immutable.OrderedMap {2: "two", 1: "one"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(Immutable.Map {\\"1\\": Immutable.Map {\\"2\\": {\\"a\\": 99}}}).toEqual(Immutable.Map {\\"1\\": Immutable.Map {\\"2\\": {\\"a\\": 11}}})", + "name": "{pass: false} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 11}}})", "result": "success", "time": 1, }, @@ -14768,13 +14852,13 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 1, \\"b\\": 2}).toEqual(ObjectContaining {\\"a\\": 2})", + "name": "{pass: false} expect({"a": 1, "b": 2}).toEqual(ObjectContaining {"a": 2})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(false).toEqual(ObjectContaining {\\"a\\": 2})", + "name": "{pass: false} expect(false).toEqual(ObjectContaining {"a": 2})", "result": "success", "time": 0, }, @@ -14792,13 +14876,13 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abd\\").toEqual(StringContaining \\"bc\\")", + "name": "{pass: false} expect("abd").toEqual(StringContaining "bc")", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abd\\").toEqual(StringMatching /bc/i)", + "name": "{pass: false} expect("abd").toEqual(StringMatching /bc/i)", "result": "success", "time": 0, }, @@ -14816,19 +14900,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"Eve\\").toEqual({\\"asymmetricMatch\\": [Function asymmetricMatch]})", + "name": "{pass: false} expect("Eve").toEqual({"asymmetricMatch": [Function asymmetricMatch]})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"target\\": {\\"nodeType\\": 1, \\"value\\": \\"a\\"}}).toEqual({\\"target\\": {\\"nodeType\\": 1, \\"value\\": \\"b\\"}})", + "name": "{pass: false} expect({"target": {"nodeType": 1, "value": "a"}}).toEqual({"target": {"nodeType": 1, "value": "b"}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"nodeName\\": \\"div\\", \\"nodeType\\": 1}).toEqual({\\"nodeName\\": \\"p\\", \\"nodeType\\": 1})", + "name": "{pass: false} expect({"nodeName": "div", "nodeType": 1}).toEqual({"nodeName": "p", "nodeType": 1})", "result": "success", "time": 1, }, @@ -14888,19 +14972,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abc\\").not.toEqual(\\"abc\\")", + "name": "{pass: true} expect("abc").not.toEqual("abc")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abc\\").not.toEqual(\\"abc\\")", + "name": "{pass: true} expect("abc").not.toEqual("abc")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abc\\").not.toEqual(\\"abc\\")", + "name": "{pass: true} expect("abc").not.toEqual("abc")", "result": "success", "time": 1, }, @@ -14936,7 +15020,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 99}).not.toEqual({\\"a\\": 99})", + "name": "{pass: true} expect({"a": 99}).not.toEqual({"a": 99})", "result": "success", "time": 1, }, @@ -14978,7 +15062,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Set {{\\"a\\": 1}, {\\"b\\": 2}}).not.toEqual(Set {{\\"b\\": 2}, {\\"a\\": 1}})", + "name": "{pass: true} expect(Set {{"a": 1}, {"b": 2}}).not.toEqual(Set {{"b": 2}, {"a": 1}})", "result": "success", "time": 0, }, @@ -15020,43 +15104,43 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {1 => \\"one\\", 2 => \\"two\\"}).not.toEqual(Map {1 => \\"one\\", 2 => \\"two\\"})", + "name": "{pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {1 => "one", 2 => "two"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {1 => \\"one\\", 2 => \\"two\\"}).not.toEqual(Map {2 => \\"two\\", 1 => \\"one\\"})", + "name": "{pass: true} expect(Map {1 => "one", 2 => "two"}).not.toEqual(Map {2 => "two", 1 => "one"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {[1] => \\"one\\", [2] => \\"two\\", [3] => \\"three\\", [3] => \\"four\\"}).not.toEqual(Map {[3] => \\"three\\", [3] => \\"four\\", [2] => \\"two\\", [1] => \\"one\\"})", + "name": "{pass: true} expect(Map {[1] => "one", [2] => "two", [3] => "three", [3] => "four"}).not.toEqual(Map {[3] => "three", [3] => "four", [2] => "two", [1] => "one"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {[1] => Map {[1] => \\"one\\"}, [2] => Map {[2] => \\"two\\"}}).not.toEqual(Map {[2] => Map {[2] => \\"two\\"}, [1] => Map {[1] => \\"one\\"}})", + "name": "{pass: true} expect(Map {[1] => Map {[1] => "one"}, [2] => Map {[2] => "two"}}).not.toEqual(Map {[2] => Map {[2] => "two"}, [1] => Map {[1] => "one"}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {[1] => \\"one\\", [2] => \\"two\\"}).not.toEqual(Map {[2] => \\"two\\", [1] => \\"one\\"})", + "name": "{pass: true} expect(Map {[1] => "one", [2] => "two"}).not.toEqual(Map {[2] => "two", [1] => "one"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {{\\"a\\": 1} => \\"one\\", {\\"b\\": 2} => \\"two\\"}).not.toEqual(Map {{\\"b\\": 2} => \\"two\\", {\\"a\\": 1} => \\"one\\"})", + "name": "{pass: true} expect(Map {{"a": 1} => "one", {"b": 2} => "two"}).not.toEqual(Map {{"b": 2} => "two", {"a": 1} => "one"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Map {1 => [\\"one\\"], 2 => [\\"two\\"]}).not.toEqual(Map {2 => [\\"two\\"], 1 => [\\"one\\"]})", + "name": "{pass: true} expect(Map {1 => ["one"], 2 => ["two"]}).not.toEqual(Map {2 => ["two"], 1 => ["one"]})", "result": "success", "time": 1, }, @@ -15068,25 +15152,25 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Immutable.Map {1: \\"one\\", 2: \\"two\\"}).not.toEqual(Immutable.Map {1: \\"one\\", 2: \\"two\\"})", + "name": "{pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {1: "one", 2: "two"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Immutable.Map {1: \\"one\\", 2: \\"two\\"}).not.toEqual(Immutable.Map {2: \\"two\\", 1: \\"one\\"})", + "name": "{pass: true} expect(Immutable.Map {1: "one", 2: "two"}).not.toEqual(Immutable.Map {2: "two", 1: "one"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Immutable.OrderedMap {1: \\"one\\", 2: \\"two\\"}).not.toEqual(Immutable.OrderedMap {1: \\"one\\", 2: \\"two\\"})", + "name": "{pass: true} expect(Immutable.OrderedMap {1: "one", 2: "two"}).not.toEqual(Immutable.OrderedMap {1: "one", 2: "two"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(Immutable.Map {\\"1\\": Immutable.Map {\\"2\\": {\\"a\\": 99}}}).not.toEqual(Immutable.Map {\\"1\\": Immutable.Map {\\"2\\": {\\"a\\": 99}}})", + "name": "{pass: true} expect(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}}).not.toEqual(Immutable.Map {"1": Immutable.Map {"2": {"a": 99}}})", "result": "success", "time": 1, }, @@ -15098,7 +15182,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 1, \\"b\\": 2}).not.toEqual(ObjectContaining {\\"a\\": 1})", + "name": "{pass: true} expect({"a": 1, "b": 2}).not.toEqual(ObjectContaining {"a": 1})", "result": "success", "time": 0, }, @@ -15110,13 +15194,13 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abcd\\").not.toEqual(StringContaining \\"bc\\")", + "name": "{pass: true} expect("abcd").not.toEqual(StringContaining "bc")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abcd\\").not.toEqual(StringMatching /bc/)", + "name": "{pass: true} expect("abcd").not.toEqual(StringMatching /bc/)", "result": "success", "time": 1, }, @@ -15134,19 +15218,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 1, \\"b\\": [Function b], \\"c\\": true}).not.toEqual({\\"a\\": 1, \\"b\\": Any, \\"c\\": Anything})", + "name": "{pass: true} expect({"a": 1, "b": [Function b], "c": true}).not.toEqual({"a": 1, "b": Any, "c": Anything})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"Alice\\").not.toEqual({\\"asymmetricMatch\\": [Function asymmetricMatch]})", + "name": "{pass: true} expect("Alice").not.toEqual({"asymmetricMatch": [Function asymmetricMatch]})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"nodeName\\": \\"div\\", \\"nodeType\\": 1}).not.toEqual({\\"nodeName\\": \\"div\\", \\"nodeType\\": 1})", + "name": "{pass: true} expect({"nodeName": "div", "nodeType": 1}).not.toEqual({"nodeName": "div", "nodeType": 1})", "result": "success", "time": 0, }, @@ -15188,7 +15272,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 99n}).not.toEqual({\\"a\\": 99n})", + "name": "{pass: true} expect({"a": 99n}).not.toEqual({"a": 99n})", "result": "success", "time": 0, }, @@ -15226,7 +15310,7 @@ string\\"", }, TestGroupResult { "name": ".toEqual() cyclic object equality", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "properties with the same circularity are equal", @@ -15249,7 +15333,7 @@ string\\"", }, TestGroupResult { "name": ".toBeInstanceOf()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "passing Map {} and [Function Map]", @@ -15300,7 +15384,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "failing \\"a\\" and [Function String]", + "name": "failing "a" and [Function String]", "result": "success", "time": 0, }, @@ -15342,7 +15426,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "failing /\\\\w+/ and [Function anonymous]", + "name": "failing /\\w+/ and [Function anonymous]", "result": "success", "time": 1, }, @@ -15362,7 +15446,7 @@ string\\"", }, TestGroupResult { "name": ".toBeTruthy(), .toBeFalsy()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not accept arguments", @@ -15395,7 +15479,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'\\"a\\"' is truthy", + "name": "'"a"' is truthy", "result": "success", "time": 1, }, @@ -15455,7 +15539,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'\\"\\"' is falsy", + "name": "'""' is falsy", "result": "success", "time": 1, }, @@ -15475,7 +15559,7 @@ string\\"", }, TestGroupResult { "name": ".toBeNaN()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: true} expect(NaN).toBeNaN()", @@ -15492,7 +15576,7 @@ string\\"", }, TestGroupResult { "name": ".toBeNull()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails for '{}'", @@ -15519,7 +15603,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "fails for '\\"a\\"'", + "name": "fails for '"a"'", "result": "success", "time": 0, }, @@ -15563,7 +15647,7 @@ string\\"", }, TestGroupResult { "name": ".toBeDefined(), .toBeUndefined()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "'{}' is defined", @@ -15590,7 +15674,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'\\"a\\"' is defined", + "name": "'"a"' is defined", "result": "success", "time": 0, }, @@ -15634,7 +15718,7 @@ string\\"", }, TestGroupResult { "name": ".toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: true} expect(1).toBeLessThan(2)", @@ -16227,7 +16311,7 @@ string\\"", }, TestGroupResult { "name": ".toContain(), .toContainEqual()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "iterable", @@ -16242,7 +16326,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'[\\"a\\", \\"b\\", \\"c\\", \\"d\\"]' contains '\\"a\\"'", + "name": "'["a", "b", "c", "d"]' contains '"a"'", "result": "success", "time": 1, }, @@ -16266,19 +16350,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'\\"abcdef\\"' contains '\\"abc\\"'", + "name": "'"abcdef"' contains '"abc"'", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "'\\"11112111\\"' contains '\\"2\\"'", + "name": "'"11112111"' contains '"2"'", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "'Set {\\"abc\\", \\"def\\"}' contains '\\"abc\\"'", + "name": "'Set {"abc", "def"}' contains '"abc"'", "result": "success", "time": 0, }, @@ -16344,7 +16428,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'[\\"a\\", \\"b\\", \\"c\\", \\"d\\"]' contains a value equal to '\\"a\\"'", + "name": "'["a", "b", "c", "d"]' contains a value equal to '"a"'", "result": "success", "time": 0, }, @@ -16368,7 +16452,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'[{\\"a\\": \\"b\\"}, {\\"a\\": \\"c\\"}]' contains a value equal to '{\\"a\\": \\"b\\"}'", + "name": "'[{"a": "b"}, {"a": "c"}]' contains a value equal to '{"a": "b"}'", "result": "success", "time": 1, }, @@ -16386,7 +16470,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "'[{\\"a\\": \\"b\\"}, {\\"a\\": \\"c\\"}]' does not contain a value equal to'{\\"a\\": \\"d\\"}'", + "name": "'[{"a": "b"}, {"a": "c"}]' does not contain a value equal to'{"a": "d"}'", "result": "success", "time": 2, }, @@ -16400,7 +16484,7 @@ string\\"", }, TestGroupResult { "name": ".toBeCloseTo", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: true} expect(0).toBeCloseTo(0)", @@ -16525,7 +16609,7 @@ string\\"", }, TestGroupResult { "name": ".toBeCloseTo throws: Matcher error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "promise empty isNot false received", @@ -16566,7 +16650,7 @@ string\\"", }, TestGroupResult { "name": ".toMatch()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: true} expect(foo).toMatch(foo)", @@ -16593,79 +16677,79 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [1, \\"foo\\"]", + "name": "throws if non String actual value passed: [1, "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [{}, \\"foo\\"]", + "name": "throws if non String actual value passed: [{}, "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [[], \\"foo\\"]", + "name": "throws if non String actual value passed: [[], "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [true, \\"foo\\"]", + "name": "throws if non String actual value passed: [true, "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [/foo/i, \\"foo\\"]", + "name": "throws if non String actual value passed: [/foo/i, "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [[Function anonymous], \\"foo\\"]", + "name": "throws if non String actual value passed: [[Function anonymous], "foo"]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String actual value passed: [undefined, \\"foo\\"]", + "name": "throws if non String actual value passed: [undefined, "foo"]", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", 1]", + "name": "throws if non String/RegExp expected value passed: ["foo", 1]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", {}]", + "name": "throws if non String/RegExp expected value passed: ["foo", {}]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", []]", + "name": "throws if non String/RegExp expected value passed: ["foo", []]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", true]", + "name": "throws if non String/RegExp expected value passed: ["foo", true]", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", [Function anonymous]]", + "name": "throws if non String/RegExp expected value passed: ["foo", [Function anonymous]]", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "throws if non String/RegExp expected value passed: [\\"foo\\", undefined]", + "name": "throws if non String/RegExp expected value passed: ["foo", undefined]", "result": "success", "time": 0, }, @@ -16685,7 +16769,7 @@ string\\"", }, TestGroupResult { "name": ".toHaveLength", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "{pass: true} expect([1, 2]).toHaveLength(2)", @@ -16700,19 +16784,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect([\\"a\\", \\"b\\"]).toHaveLength(2)", + "name": "{pass: true} expect(["a", "b"]).toHaveLength(2)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"abc\\").toHaveLength(3)", + "name": "{pass: true} expect("abc").toHaveLength(3)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"\\").toHaveLength(0)", + "name": "{pass: true} expect("").toHaveLength(0)", "result": "success", "time": 0, }, @@ -16736,19 +16820,19 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect([\\"a\\", \\"b\\"]).toHaveLength(99)", + "name": "{pass: false} expect(["a", "b"]).toHaveLength(99)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abc\\").toHaveLength(66)", + "name": "{pass: false} expect("abc").toHaveLength(66)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"\\").toHaveLength(1)", + "name": "{pass: false} expect("").toHaveLength(1)", "result": "success", "time": 1, }, @@ -16762,7 +16846,7 @@ string\\"", }, TestGroupResult { "name": ".toHaveLength matcher error expected length", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "not number", @@ -16797,64 +16881,64 @@ string\\"", }, TestGroupResult { "name": ".toHaveProperty()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a.b.c.d', 1)", + "name": "{pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 1)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a,b,c,d', 1)", + "name": "{pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 1)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a.b.c.d\\": 1}).toHaveProperty('a.b.c.d', 1)", + "name": "{pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 1)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": [1, 2, 3]}}).toHaveProperty('a,b,1', 2)", + "name": "{pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', 2)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": [1, 2, 3]}}).toHaveProperty('a,b,1', Any)", + "name": "{pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1', Any)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 0}).toHaveProperty('a', 0)", + "name": "{pass: true} expect({"a": 0}).toHaveProperty('a', 0)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": undefined}}).toHaveProperty('a.b', undefined)", + "name": "{pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b', undefined)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {}}).toHaveProperty('a.b', undefined)", + "name": "{pass: true} expect({"a": {}}).toHaveProperty('a.b', undefined)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": {\\"c\\": 5}}}).toHaveProperty('a.b', {\\"c\\": 5})", + "name": "{pass: true} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 5})", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"property\\": 1}).toHaveProperty('property', 1)", + "name": "{pass: true} expect({"property": 1}).toHaveProperty('property', 1)", "result": "success", "time": 0, }, @@ -16866,7 +16950,7 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({}).toHaveProperty('b', \\"b\\")", + "name": "{pass: true} expect({}).toHaveProperty('b', "b")", "result": "success", "time": 0, }, @@ -16878,31 +16962,31 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"val\\": true}).toHaveProperty('a', undefined)", + "name": "{pass: true} expect({"val": true}).toHaveProperty('a', undefined)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"val\\": true}).toHaveProperty('c', \\"c\\")", + "name": "{pass: true} expect({"val": true}).toHaveProperty('c', "c")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"val\\": true}).toHaveProperty('val', true)", + "name": "{pass: true} expect({"val": true}).toHaveProperty('val', true)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"nodeName\\": \\"DIV\\"}).toHaveProperty('nodeType', 1)", + "name": "{pass: true} expect({"nodeName": "DIV"}).toHaveProperty('nodeType', 1)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect(\\"\\").toHaveProperty('length', 0)", + "name": "{pass: true} expect("").toHaveProperty('length', 0)", "result": "success", "time": 0, }, @@ -16914,95 +16998,95 @@ string\\"", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a.b.ttt.d', 1)", + "name": "{pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.ttt.d', 1)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a.b.c.d', 2)", + "name": "{pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 2)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a.b.c.d\\": 1}).toHaveProperty('a.b.c.d', 2)", + "name": "{pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2)", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a.b.c.d\\": 1}).toHaveProperty('a.b.c.d', 2)", + "name": "{pass: false} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d', 2)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"children\\": [\\"\\\\\\"That cartoon\\\\\\"\\"], \\"props\\": null, \\"type\\": \\"p\\"}).toHaveProperty('children,0', \\"\\\\\\"That cat cartoon\\\\\\"\\")", + "name": "{pass: false} expect({"children": ["\\"That cartoon\\""], "props": null, "type": "p"}).toHaveProperty('children,0', "\\"That cat cartoon\\"")", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"children\\": [\\"Roses are red. + "name": "{pass: false} expect({"children": ["Roses are red. Violets are blue. -Testing with Jest is good for you.\\"], \\"props\\": null, \\"type\\": \\"pre\\"}).toHaveProperty('children,0', \\"Roses are red, violets are blue. +Testing with Jest is good for you."], "props": null, "type": "pre"}).toHaveProperty('children,0', "Roses are red, violets are blue. Testing with Jest -Is good for you.\\")", +Is good for you.")", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a,b,c,d', 2)", + "name": "{pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d', 2)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": {}}}}).toHaveProperty('a.b.c.d', 1)", + "name": "{pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d', 1)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 1}).toHaveProperty('a.b.c.d', 5)", + "name": "{pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d', 5)", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({}).toHaveProperty('a', \\"test\\")", + "name": "{pass: false} expect({}).toHaveProperty('a', "test")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": 3}}).toHaveProperty('a.b', undefined)", + "name": "{pass: false} expect({"a": {"b": 3}}).toHaveProperty('a.b', undefined)", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(1).toHaveProperty('a.b.c', \\"test\\")", + "name": "{pass: false} expect(1).toHaveProperty('a.b.c', "test")", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abc\\").toHaveProperty('a.b.c', {\\"a\\": 5})", + "name": "{pass: false} expect("abc").toHaveProperty('a.b.c', {"a": 5})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": 5}}}).toHaveProperty('a.b', {\\"c\\": 4})", + "name": "{pass: false} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 4})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({}).toHaveProperty('a', \\"a\\")", + "name": "{pass: false} expect({}).toHaveProperty('a', "a")", "result": "success", "time": 1, }, @@ -17014,49 +17098,49 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a.b.c.d')", + "name": "{pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}}).toHaveProperty('a,b,c,d')", + "name": "{pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a,b,c,d')", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a.b.c.d\\": 1}).toHaveProperty('a.b.c.d')", + "name": "{pass: true} expect({"a.b.c.d": 1}).toHaveProperty('a.b.c.d')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": [1, 2, 3]}}).toHaveProperty('a,b,1')", + "name": "{pass: true} expect({"a": {"b": [1, 2, 3]}}).toHaveProperty('a,b,1')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 0}).toHaveProperty('a')", + "name": "{pass: true} expect({"a": 0}).toHaveProperty('a')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"b\\": undefined}}).toHaveProperty('a.b')", + "name": "{pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": {\\"b\\": {\\"c\\": {}}}}).toHaveProperty('a.b.c.d')", + "name": "{pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d')", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 1}).toHaveProperty('a.b.c.d')", + "name": "{pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d')", "result": "success", "time": 0, }, @@ -17074,7 +17158,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"abc\\").toHaveProperty('a.b.c')", + "name": "{pass: false} expect("abc").toHaveProperty('a.b.c')", "result": "success", "time": 0, }, @@ -17092,7 +17176,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect(\\"\\").toHaveProperty('key')", + "name": "{pass: false} expect("").toHaveProperty('key')", "result": "success", "time": 0, }, @@ -17104,7 +17188,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"key\\": 1}).toHaveProperty('not')", + "name": "{pass: false} expect({"key": 1}).toHaveProperty('not')", "result": "success", "time": 0, }, @@ -17122,19 +17206,19 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{error} expect({\\"a\\": {\\"b\\": {}}}).toHaveProperty('undefined')", + "name": "{error} expect({"a": {"b": {}}}).toHaveProperty('undefined')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{error} expect({\\"a\\": {\\"b\\": {}}}).toHaveProperty('null')", + "name": "{error} expect({"a": {"b": {}}}).toHaveProperty('null')", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{error} expect({\\"a\\": {\\"b\\": {}}}).toHaveProperty('1')", + "name": "{error} expect({"a": {"b": {}}}).toHaveProperty('1')", "result": "success", "time": 0, }, @@ -17148,34 +17232,34 @@ Is good for you.\\")", }, TestGroupResult { "name": "toMatchObject() circular references simple circular references", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"hello\\", \\"ref\\": [Circular]}).toMatchObject({})", + "name": "{pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({})", "result": "success", "time": 3, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"hello\\", \\"ref\\": [Circular]}).toMatchObject({\\"a\\": \\"hello\\", \\"ref\\": [Circular]})", + "name": "{pass: true} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "hello", "ref": [Circular]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({}).toMatchObject({\\"a\\": \\"hello\\", \\"ref\\": [Circular]})", + "name": "{pass: false} expect({}).toMatchObject({"a": "hello", "ref": [Circular]})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"hello\\", \\"ref\\": [Circular]}).toMatchObject({\\"a\\": \\"world\\", \\"ref\\": [Circular]})", + "name": "{pass: false} expect({"a": "hello", "ref": [Circular]}).toMatchObject({"a": "world", "ref": [Circular]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"ref\\": \\"not a ref\\"}).toMatchObject({\\"a\\": \\"hello\\", \\"ref\\": [Circular]})", + "name": "{pass: false} expect({"ref": "not a ref"}).toMatchObject({"a": "hello", "ref": [Circular]})", "result": "success", "time": 1, }, @@ -17183,34 +17267,34 @@ Is good for you.\\")", }, TestGroupResult { "name": "toMatchObject() circular references transitive circular references", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}}).toMatchObject({})", + "name": "{pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}}).toMatchObject({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}})", + "name": "{pass: true} expect({"a": "hello", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({}).toMatchObject({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}})", + "name": "{pass: false} expect({}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"world\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}}).toMatchObject({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}})", + "name": "{pass: false} expect({"a": "world", "nestedObj": {"parentObj": [Circular]}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"nestedObj\\": {\\"parentObj\\": \\"not the parent ref\\"}}).toMatchObject({\\"a\\": \\"hello\\", \\"nestedObj\\": {\\"parentObj\\": [Circular]}})", + "name": "{pass: false} expect({"nestedObj": {"parentObj": "not the parent ref"}}).toMatchObject({"a": "hello", "nestedObj": {"parentObj": [Circular]}})", "result": "success", "time": 1, }, @@ -17218,52 +17302,52 @@ Is good for you.\\")", }, TestGroupResult { "name": "toMatchObject()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\"}).toMatchObject({\\"a\\": \\"b\\"})", + "name": "{pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\"}).toMatchObject({\\"a\\": \\"b\\", \\"c\\": \\"d\\"})", + "name": "{pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b", "c": "d"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}).toMatchObject({\\"a\\": \\"b\\", \\"t\\": {\\"z\\": \\"z\\"}})", + "name": "{pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": "z"}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}).toMatchObject({\\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}}})", + "name": "{pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"x": {"r": "r"}}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": [3, 4, 5]})", + "name": "{pass: true} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5]})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": [3, 4, 5, \\"v\\"], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": [3, 4, 5, \\"v\\"]})", + "name": "{pass: true} expect({"a": [3, 4, 5, "v"], "b": "b"}).toMatchObject({"a": [3, 4, 5, "v"]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 1, \\"c\\": 2}).toMatchObject({\\"a\\": Any})", + "name": "{pass: true} expect({"a": 1, "c": 2}).toMatchObject({"a": Any})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": {\\"x\\": \\"x\\", \\"y\\": \\"y\\"}}).toMatchObject({\\"a\\": {\\"x\\": Any}})", + "name": "{pass: true} expect({"a": {"x": "x", "y": "y"}}).toMatchObject({"a": {"x": Any}})", "result": "success", "time": 0, }, @@ -17287,25 +17371,25 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": 2015-11-30T00:00:00.000Z, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": 2015-11-30T00:00:00.000Z})", + "name": "{pass: true} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-11-30T00:00:00.000Z})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": null, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": null})", + "name": "{pass: true} expect({"a": null, "b": "b"}).toMatchObject({"a": null})", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": undefined, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": undefined})", + "name": "{pass: true} expect({"a": undefined, "b": "b"}).toMatchObject({"a": undefined})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": [{\\"a\\": \\"a\\", \\"b\\": \\"b\\"}]}).toMatchObject({\\"a\\": [{\\"a\\": \\"a\\"}]})", + "name": "{pass: true} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "a"}]})", "result": "success", "time": 1, }, @@ -17317,7 +17401,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": undefined}).toMatchObject({\\"a\\": undefined})", + "name": "{pass: true} expect({"a": undefined}).toMatchObject({"a": undefined})", "result": "success", "time": 1, }, @@ -17335,109 +17419,109 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect([Error: bar]).toMatchObject({\\"message\\": \\"bar\\"})", + "name": "{pass: true} expect([Error: bar]).toMatchObject({"message": "bar"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({}).toMatchObject({\\"a\\": undefined, \\"b\\": \\"b\\"})", + "name": "{pass: true} expect({}).toMatchObject({"a": undefined, "b": "b"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\"}).toMatchObject({\\"a\\": \\"b\\"})", + "name": "{pass: true} expect({"a": "b"}).toMatchObject({"a": "b"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\", Symbol(jest): \\"jest\\"}).toMatchObject({\\"a\\": \\"b\\", Symbol(jest): \\"jest\\"})", + "name": "{pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", Symbol(jest): "jest"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\", Symbol(jest): \\"jest\\"}).toMatchObject({\\"a\\": \\"b\\", \\"c\\": \\"d\\", Symbol(jest): \\"jest\\"})", + "name": "{pass: true} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "b", "c": "d", Symbol(jest): "jest"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({}).toMatchObject({\\"a\\": undefined, \\"b\\": \\"b\\", \\"c\\": \\"c\\"})", + "name": "{pass: true} expect({}).toMatchObject({"a": undefined, "b": "b", "c": "c"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({}).toMatchObject({\\"d\\": 4})", + "name": "{pass: true} expect({}).toMatchObject({"d": 4})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: true} expect({\\"a\\": \\"b\\", \\"toString\\": [Function toString]}).toMatchObject({\\"toString\\": Any})", + "name": "{pass: true} expect({"a": "b", "toString": [Function toString]}).toMatchObject({"toString": Any})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\"}).toMatchObject({\\"e\\": \\"b\\"})", + "name": "{pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"e": "b"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\"}).toMatchObject({\\"a\\": \\"b!\\", \\"c\\": \\"d\\"})", + "name": "{pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b!", "c": "d"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"a\\", \\"c\\": \\"d\\"}).toMatchObject({\\"a\\": Any})", + "name": "{pass: false} expect({"a": "a", "c": "d"}).toMatchObject({"a": Any})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}).toMatchObject({\\"a\\": \\"b\\", \\"t\\": {\\"z\\": [3]}})", + "name": "{pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": [3]}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}).toMatchObject({\\"t\\": {\\"l\\": {\\"r\\": \\"r\\"}}})", + "name": "{pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"l": {"r": "r"}}})", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": [3, 4, 5, 6]})", + "name": "{pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5, 6]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": [3, 4]})", + "name": "{pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4]})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [3, 4, \\"v\\"], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": [\\"v\\"]})", + "name": "{pass: false} expect({"a": [3, 4, "v"], "b": "b"}).toMatchObject({"a": ["v"]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": {\\"b\\": 4}})", + "name": "{pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": 4}})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": {\\"b\\": Any}})", + "name": "{pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": Any}})", "result": "success", "time": 1, }, @@ -17467,43 +17551,43 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 2015-11-30T00:00:00.000Z, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": 2015-10-10T00:00:00.000Z})", + "name": "{pass: false} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-10-10T00:00:00.000Z})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": null, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": \\"4\\"})", + "name": "{pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": "4"})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": null, \\"b\\": \\"b\\"}).toMatchObject({\\"a\\": undefined})", + "name": "{pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": undefined})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": undefined}).toMatchObject({\\"a\\": null})", + "name": "{pass: false} expect({"a": undefined}).toMatchObject({"a": null})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": [{\\"a\\": \\"a\\", \\"b\\": \\"b\\"}]}).toMatchObject({\\"a\\": [{\\"a\\": \\"c\\"}]})", + "name": "{pass: false} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "c"}]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": 1, \\"b\\": 1, \\"c\\": 1, \\"d\\": {\\"e\\": {\\"f\\": 555}}}).toMatchObject({\\"d\\": {\\"e\\": {\\"f\\": 222}}})", + "name": "{pass: false} expect({"a": 1, "b": 1, "c": 1, "d": {"e": {"f": 555}}}).toMatchObject({"d": {"e": {"f": 222}}})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({}).toMatchObject({\\"a\\": undefined})", + "name": "{pass: false} expect({}).toMatchObject({"a": undefined})", "result": "success", "time": 0, }, @@ -17527,19 +17611,19 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\"}).toMatchObject({\\"c\\": \\"d\\"})", + "name": "{pass: false} expect({"a": "b"}).toMatchObject({"c": "d"})", "result": "success", "time": 4, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\", \\"c\\": \\"d\\", Symbol(jest): \\"jest\\"}).toMatchObject({\\"a\\": \\"c\\", Symbol(jest): Any})", + "name": "{pass: false} expect({"a": "b", "c": "d", Symbol(jest): "jest"}).toMatchObject({"a": "c", Symbol(jest): Any})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "{pass: false} expect({\\"a\\": \\"b\\"}).toMatchObject({\\"toString\\": Any})", + "name": "{pass: false} expect({"a": "b"}).toMatchObject({"toString": Any})", "result": "success", "time": 0, }, @@ -17557,7 +17641,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "throws expect(\\"44\\").toMatchObject({})", + "name": "throws expect("44").toMatchObject({})", "result": "success", "time": 0, }, @@ -17587,7 +17671,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "throws expect({}).toMatchObject(\\"some string\\")", + "name": "throws expect({}).toMatchObject("some string")", "result": "success", "time": 0, }, @@ -17616,10 +17700,10 @@ Is good for you.\\")", "totalTime": 862, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "understands dependencies using jest.requireActual", @@ -17633,10 +17717,10 @@ Is good for you.\\")", "totalTime": 1665, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Watch mode flows", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Correctly passing test path pattern", @@ -18029,43 +18113,43 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "Pressing \\"o\\" runs test in \\"only changed files\\" mode", + "name": "Pressing "o" runs test in "only changed files" mode", "result": "success", "time": 69, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"a\\" runs test in \\"watch all\\" mode", + "name": "Pressing "a" runs test in "watch all" mode", "result": "success", "time": 62, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"ENTER\\" reruns the tests", + "name": "Pressing "ENTER" reruns the tests", "result": "success", "time": 108, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"t\\" reruns the tests in \\"test name pattern\\" mode", + "name": "Pressing "t" reruns the tests in "test name pattern" mode", "result": "success", "time": 93, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"p\\" reruns the tests in \\"filename pattern\\" mode", + "name": "Pressing "p" reruns the tests in "filename pattern" mode", "result": "success", "time": 80, }, TestCaseResult { "error": undefined, - "name": "Can combine \\"p\\" and \\"t\\" filters", + "name": "Can combine "p" and "t" filters", "result": "success", "time": 68, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"u\\" reruns the tests in \\"update snapshot\\" mode", + "name": "Pressing "u" reruns the tests in "update snapshot" mode", "result": "success", "time": 67, }, @@ -18077,7 +18161,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "shows the correct usage for the f key in \\"only failed tests\\" mode", + "name": "shows the correct usage for the f key in "only failed tests" mode", "result": "success", "time": 62, }, @@ -18085,7 +18169,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Watch mode flows when dealing with potential watch plugin key conflicts", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "forbids WatchPlugins overriding reserved internal plugins", @@ -18129,10 +18213,10 @@ Is good for you.\\")", "totalTime": 6755, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "transitive dependencies", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mocks a manually mocked and mapped module", @@ -18176,10 +18260,10 @@ Is good for you.\\")", "totalTime": 2366, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Watch mode flows with changed files", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should correct require new files without legacy cache", @@ -18193,10 +18277,10 @@ Is good for you.\\")", "totalTime": 1514, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "HasteMap", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exports constants", @@ -18301,7 +18385,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "throws on duplicate module ids if \\"throwOnModuleCollision\\" is set to true", + "name": "throws on duplicate module ids if "throwOnModuleCollision" is set to true", "result": "success", "time": 5, }, @@ -18387,7 +18471,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "HasteMap builds a haste map on a fresh cache with SHA-1s", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses watchman: false", @@ -18404,7 +18488,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "HasteMap duplicate modules", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "recovers when a duplicate file is deleted", @@ -18427,7 +18511,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "HasteMap file system changes processing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "provides a new set of hasteHS and moduleMap", @@ -18462,7 +18546,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "HasteMap file system changes processing recovery from duplicate module IDs", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "recovers when the oldest version of the duplicates is fixed", @@ -18488,10 +18572,10 @@ Is good for you.\\")", "totalTime": 1145, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "code coverage for Handlebars", @@ -18505,10 +18589,10 @@ Is good for you.\\")", "totalTime": 1873, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not crash when expect involving a DOM node fails", @@ -18522,10 +18606,10 @@ Is good for you.\\")", "totalTime": 1407, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "check is not leaking memory", @@ -18539,10 +18623,10 @@ Is good for you.\\")", "totalTime": 1744, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolve platform modules", @@ -18556,10 +18640,10 @@ Is good for you.\\")", "totalTime": 1863, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Snapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "stores new snapshots on the first run", @@ -18588,7 +18672,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Snapshot Validation", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not save snapshots in CI mode by default", @@ -18626,10 +18710,10 @@ Is good for you.\\")", "totalTime": 13899, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mocks modules by default when using automocking", @@ -18694,7 +18778,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "resetModules", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets all the modules", @@ -18705,7 +18789,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "isolateModules", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "keeps it's registry isolated from global one", @@ -18740,7 +18824,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "isolateModules can use isolateModules from a beforeEach block", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "can use the required module from beforeEach and re-require it", @@ -18754,10 +18838,10 @@ Is good for you.\\")", "totalTime": 1223, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireMock", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses manual mocks before attempting to automock", @@ -18843,10 +18927,10 @@ Is good for you.\\")", "totalTime": 962, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses NODE_PATH to find modules", @@ -18878,10 +18962,10 @@ Is good for you.\\")", "totalTime": 1088, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime require.resolve", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolves a module path", @@ -18898,7 +18982,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Runtime require.resolve with the jest-resolve-outside-vm-option", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "forwards to the real Node require in an internal context", @@ -18924,10 +19008,10 @@ Is good for you.\\")", "totalTime": 707, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "complains if the value is a primitive", @@ -18971,10 +19055,10 @@ Is good for you.\\")", "totalTime": 986, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "async jasmine with pending during test", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not work on jest-circus", @@ -18994,10 +19078,10 @@ Is good for you.\\")", "totalTime": 72, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "config for reporters supports \`default\`", @@ -19053,10 +19137,10 @@ Is good for you.\\")", "totalTime": 520, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "expect works correctly with RegExps created inside a VM", @@ -19070,10 +19154,10 @@ Is good for you.\\")", "totalTime": 1527, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireActual", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "requires node module when manual mock exists", @@ -19093,10 +19177,10 @@ Is good for you.\\")", "totalTime": 478, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime require.cache", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "require.cache returns loaded module list as native Nodejs require does", @@ -19116,10 +19200,10 @@ Is good for you.\\")", "totalTime": 454, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses configured moduleDirectories", @@ -19151,10 +19235,10 @@ Is good for you.\\")", "totalTime": 525, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime internalModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "loads modules and applies transforms", @@ -19186,10 +19270,10 @@ Is good for you.\\")", "totalTime": 727, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "check", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns true if the arguments are valid", @@ -19240,31 +19324,31 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "allows using \\"js\\" file for --config option", + "name": "allows using "js" file for --config option", "result": "success", "time": 10, }, TestCaseResult { "error": undefined, - "name": "allows using \\"ts\\" file for --config option", + "name": "allows using "ts" file for --config option", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "allows using \\"mjs\\" file for --config option", + "name": "allows using "mjs" file for --config option", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "allows using \\"cjs\\" file for --config option", + "name": "allows using "cjs" file for --config option", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "allows using \\"json\\" file for --config option", + "name": "allows using "json" file for --config option", "result": "success", "time": 0, }, @@ -19290,7 +19374,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "buildArgv", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return only camelcased args", @@ -19304,10 +19388,10 @@ Is good for you.\\")", "totalTime": 345, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime jest.spyOn", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls the original function", @@ -19318,7 +19402,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Runtime jest.spyOnProperty", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls the original function", @@ -19332,10 +19416,10 @@ Is good for you.\\")", "totalTime": 521, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolves no dependencies for non-existent path", @@ -19409,10 +19493,10 @@ Is good for you.\\")", "totalTime": 666, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should exclude jasmine from stack trace for Unix paths.", @@ -19465,7 +19549,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "formatStackTrace", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints code frame and stacktrace", @@ -19491,10 +19575,10 @@ Is good for you.\\")", "totalTime": 205, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "different types", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "'1' and 'a'", @@ -19529,10 +19613,10 @@ Is good for you.\\")", }, TestGroupResult { "name": "no visual difference", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "'\\"a\\"' and '\\"a\\"'", + "name": "'"a"' and '"a"'", "result": "success", "time": 2, }, @@ -19598,13 +19682,13 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "'{\\"a\\":1}' and '{\\"a\\":1}'", + "name": "'{"a":1}' and '{"a":1}'", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "'{\\"a\\":{\\"b\\":5}}' and '{\\"a\\":{\\"b\\":5}}'", + "name": "'{"a":{"b":5}}' and '{"a":{"b":5}}'", "result": "success", "time": 0, }, @@ -19624,7 +19708,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "oneline strings", @@ -19659,7 +19743,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "falls back to not call toJSON if serialization has no differences", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "but then objects have differences", @@ -19676,7 +19760,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "falls back to not call toJSON if it throws", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "and then objects have differences", @@ -19693,7 +19777,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "multiline strings", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19710,7 +19794,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "objects", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19727,7 +19811,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "multiline string non-snapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19744,7 +19828,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "multiline string snapshot", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19761,7 +19845,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "React elements", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19778,7 +19862,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "multiline string as value of object property (non-snapshot)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19795,7 +19879,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "multiline string as value of object property (snapshot)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19812,7 +19896,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in JavaScript structures from less to more", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19829,7 +19913,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in JavaScript structures from more to less", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19846,7 +19930,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "color of text", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(expanded)", @@ -19863,7 +19947,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in React elements (non-snapshot) from less to more", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19880,7 +19964,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in React elements (non-snapshot) from more to less", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19897,7 +19981,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in React elements (snapshot) from less to more", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19914,7 +19998,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "indentation in React elements (snapshot) from more to less", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19931,7 +20015,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "outer React element (non-snapshot) from less to more", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19948,7 +20032,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "outer React element (non-snapshot) from more to less", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19965,7 +20049,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "trailing newline in multiline string not enclosed in quotes from less to more", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19982,7 +20066,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "trailing newline in multiline string not enclosed in quotes from more to less", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "(unexpanded)", @@ -19999,7 +20083,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "context", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "number of lines: -1 (5 default)", @@ -20040,7 +20124,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "diffLinesUnified edge cases", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a empty string b empty string", @@ -20069,7 +20153,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "diffLinesUnified2 edge cases", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a empty string b empty string", @@ -20098,7 +20182,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "diffLinesUnified2 edge cases lengths not equal", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a", @@ -20115,7 +20199,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "diffStringsUnified edge cases", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "empty both a and b", @@ -20156,7 +20240,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options 7980", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diff", @@ -20173,7 +20257,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options change indicators", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diff", @@ -20184,7 +20268,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options change color", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diffStringsUnified", @@ -20201,7 +20285,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options common", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diff", @@ -20218,7 +20302,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options includeChangeCounts false", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diffLinesUnified", @@ -20235,7 +20319,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options includeChangeCounts true padding", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diffLinesUnified a has 2 digits", @@ -20258,7 +20342,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options omitAnnotationLines true", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diff", @@ -20281,7 +20365,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options trailingSpaceFormatter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diffDefault default no color", @@ -20304,7 +20388,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "options emptyFirstOrLastLinePlaceholder default empty string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "diffDefault", @@ -20324,13 +20408,13 @@ Is good for you.\\")", "totalTime": 625, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Watch mode flows", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "Pressing \\"T\\" enters pattern mode", + "name": "Pressing "T" enters pattern mode", "result": "success", "time": 8, }, @@ -20341,10 +20425,10 @@ Is good for you.\\")", "totalTime": 246, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toBeCalled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20385,7 +20469,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveBeenCalled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20426,7 +20510,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toBeCalledTimes", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": ".not works only on spies or jest.fn", @@ -20473,7 +20557,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveBeenCalledTimes", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": ".not works only on spies or jest.fn", @@ -20520,7 +20604,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "lastCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20597,7 +20681,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveBeenLastCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20674,7 +20758,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "nthCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20763,7 +20847,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveBeenNthCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20852,7 +20936,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toBeCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -20929,7 +21013,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveBeenCalledWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21006,7 +21090,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toReturn", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": ".not works only on jest.fn", @@ -21083,7 +21167,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveReturned", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": ".not works only on jest.fn", @@ -21160,7 +21244,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toReturnTimes", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throw matcher error if received is spy", @@ -21231,7 +21315,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveReturnedTimes", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throw matcher error if received is spy", @@ -21302,7 +21386,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "lastReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21385,7 +21469,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "lastReturnedWith lastReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with three calls", @@ -21402,7 +21486,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveLastReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21485,7 +21569,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveLastReturnedWith lastReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with three calls", @@ -21502,7 +21586,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "nthReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21585,7 +21669,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "nthReturnedWith nthReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with three calls", @@ -21632,7 +21716,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveNthReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21715,7 +21799,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveNthReturnedWith nthReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with three calls", @@ -21762,7 +21846,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toReturnWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21845,7 +21929,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toReturnWith returnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with more calls than the limit", @@ -21862,7 +21946,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveReturnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works only on spies or jest.fn", @@ -21945,7 +22029,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toHaveReturnedWith returnedWith", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with more calls than the limit", @@ -21965,10 +22049,10 @@ Is good for you.\\")", "totalTime": 395, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "gets hg SCM roots and dedupes them", @@ -22007,12 +22091,12 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "handles a bad revision for \\"changedSince\\", for git", + "name": "handles a bad revision for "changedSince", for git", "result": "success", "time": 878, }, TestCaseResult { - "error": Object { + "error": { "details": "Error: abort: empty revision range at makeError (/home/dorny/dorny/jest/node_modules/execa/lib/error.js:59:11) at handlePromise (/home/dorny/dorny/jest/node_modules/execa/index.js:114:26) @@ -22039,7 +22123,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "handles a bad revision for \\"changedSince\\", for hg", + "name": "handles a bad revision for "changedSince", for hg", "result": "success", "time": 949, }, @@ -22050,10 +22134,10 @@ Is good for you.\\")", "totalTime": 9045, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "stringify()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "[]", @@ -22098,7 +22182,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "\\"abc\\"", + "name": ""abc"", "result": "success", "time": 0, }, @@ -22128,7 +22212,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "/ab\\\\.c/gi", + "name": "/ab\\.c/gi", "result": "success", "time": 0, }, @@ -22172,7 +22256,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "ensureNumbers()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "dont throw error when variables are numbers", @@ -22195,7 +22279,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "ensureNumbers() with options", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "promise empty isNot false received", @@ -22236,7 +22320,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "ensureNoExpected()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "dont throw error when undefined", @@ -22259,7 +22343,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "diff", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "forwards to jest-diff", @@ -22288,7 +22372,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "pluralize()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "one", @@ -22311,7 +22395,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "getLabelPrinter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "0 args", @@ -22358,7 +22442,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "matcherHint", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "expectedColor", @@ -22384,19 +22468,19 @@ Is good for you.\\")", "totalTime": 391, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Watch mode flows", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "Pressing \\"P\\" enters pattern mode", + "name": "Pressing "P" enters pattern mode", "result": "success", "time": 7, }, TestCaseResult { "error": undefined, - "name": "Pressing \\"c\\" clears the filters", + "name": "Pressing "c" clears the filters", "result": "success", "time": 1, }, @@ -22407,10 +22491,10 @@ Is good for you.\\")", "totalTime": 165, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime createMockFromModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not cause side effects in the rest of the module system when generating a mock", @@ -22427,7 +22511,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Runtime", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "creates mock objects in the right environment", @@ -22441,10 +22525,10 @@ Is good for you.\\")", "totalTime": 606, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireModule", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "emulates a node stack trace during module load", @@ -22464,10 +22548,10 @@ Is good for you.\\")", "totalTime": 497, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "watchman crawler and node crawler both include dotfiles", @@ -22481,10 +22565,10 @@ Is good for you.\\")", "totalTime": 337, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "watchman watch", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns a list of all files when there are no clocks", @@ -22540,10 +22624,10 @@ Is good for you.\\")", "totalTime": 153, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "FakeTimers construction", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "installs setTimeout mock", @@ -22596,7 +22680,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runAllTicks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all ticks, in order", @@ -22655,7 +22739,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runAllTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all timers in order", @@ -22708,7 +22792,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers advanceTimersByTime", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs timers in order", @@ -22731,7 +22815,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers advanceTimersToNextTimer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs timers in order", @@ -22760,7 +22844,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers reset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets all pending setTimeouts", @@ -22789,7 +22873,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runOnlyPendingTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all timers in order", @@ -22806,7 +22890,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runWithRealTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "executes callback with native timers", @@ -22829,7 +22913,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers useRealTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets native timer APIs", @@ -22852,7 +22936,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers useFakeTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets mock timer APIs", @@ -22875,7 +22959,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers getTimerCount", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the correct count", @@ -22901,10 +22985,10 @@ Is good for you.\\")", "totalTime": 302, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime jest.fn", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "creates mock functions", @@ -22921,7 +23005,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Runtime jest.isMockFunction", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "recognizes a mocked function", @@ -22932,7 +23016,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Runtime jest.clearAllMocks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "clears all mocks", @@ -22946,10 +23030,10 @@ Is good for you.\\")", "totalTime": 479, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toStrictEqual", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be reflexive", @@ -22966,7 +23050,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "toStrictEqual on node >=9", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be equivalent to Node deepStrictEqual", @@ -22980,10 +23064,10 @@ Is good for you.\\")", "totalTime": 394, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be reflexive", @@ -23033,10 +23117,10 @@ Is good for you.\\")", "totalTime": 357, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "FakeTimers construction", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "installs setTimeout mock", @@ -23083,7 +23167,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runAllTicks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all ticks, in order", @@ -23112,7 +23196,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runAllTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all timers in order", @@ -23165,7 +23249,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers advanceTimersByTime", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs timers in order", @@ -23182,7 +23266,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers advanceTimersToNextTimer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs timers in order", @@ -23211,7 +23295,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers reset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets all pending setTimeouts", @@ -23240,7 +23324,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers runOnlyPendingTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs all timers in order", @@ -23257,7 +23341,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers useRealTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets native timer APIs", @@ -23280,7 +23364,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers useFakeTimers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resets mock timer APIs", @@ -23303,7 +23387,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "FakeTimers getTimerCount", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the correct count", @@ -23329,10 +23413,10 @@ Is good for you.\\")", "totalTime": 317, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toContain", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should always find the value when inside the array", @@ -23352,10 +23436,10 @@ Is good for you.\\")", "totalTime": 236, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime wrapCodeInModuleWrapper", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "generates the correct args for the module wrapper", @@ -23364,7 +23448,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "injects \\"extra globals\\"", + "name": "injects "extra globals"", "result": "success", "time": 43, }, @@ -23375,10 +23459,10 @@ Is good for you.\\")", "totalTime": 263, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "toContainEqual", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should always find the value when inside the array", @@ -23398,10 +23482,10 @@ Is good for you.\\")", "totalTime": 287, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "invalid arg length", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is not a number", @@ -23442,7 +23526,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "invalid arg callback", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "null is not a function", @@ -23459,7 +23543,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "input callback encapsulates comparison zero and negative zero", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "are not common according to Object.is method", @@ -23476,7 +23560,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "input callback encapsulates comparison Not a Number", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is common according to Object.is method", @@ -23493,7 +23577,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "input callback encapsulates sequences", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "arrays of strings", @@ -23516,7 +23600,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "no common items negative zero is equivalent to zero for length", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "of a", @@ -23539,7 +23623,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "no common items", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a empty and b empty", @@ -23562,7 +23646,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "no common items a non-empty and b non-empty", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "baDeltaLength 0 even", @@ -23591,7 +23675,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "only common items", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "length 1", @@ -23608,7 +23692,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "all common items outside", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "preceding changes", @@ -23631,7 +23715,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "some common items inside and outside", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "preceding changes adjacent to common in both sequences", @@ -23648,7 +23732,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "all common items inside non-recursive", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "move from start to end relative to change", @@ -23689,7 +23773,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "all common items inside recursive", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prev reverse at depth 1 and preceding at depth 2", @@ -23736,7 +23820,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "common substrings", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "progress", @@ -23762,10 +23846,10 @@ Is good for you.\\")", "totalTime": 195, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": ".getType()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "null", @@ -23857,10 +23941,10 @@ Is good for you.\\")", "totalTime": 45, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { - "name": "init project with package.json and no jest config all questions answered with answer: \\"No\\"", - "tests": Array [ + "name": "init project with package.json and no jest config all questions answered with answer: "No"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return the default configuration (an empty config)", @@ -23876,8 +23960,8 @@ Is good for you.\\")", ], }, TestGroupResult { - "name": "init project with package.json and no jest config some questions answered with answer: \\"Yes\\"", - "tests": Array [ + "name": "init project with package.json and no jest config some questions answered with answer: "Yes"", + "tests": [ TestCaseResult { "error": undefined, "name": "should create configuration for {clearMocks: true}", @@ -23892,25 +23976,25 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "should create configuration for {coverageProvider: \\"babel\\"}", + "name": "should create configuration for {coverageProvider: "babel"}", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should create configuration for {coverageProvider: \\"v8\\"}", + "name": "should create configuration for {coverageProvider: "v8"}", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should create configuration for {environment: \\"jsdom\\"}", + "name": "should create configuration for {environment: "jsdom"}", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should create configuration for {environment: \\"node\\"}", + "name": "should create configuration for {environment: "node"}", "result": "success", "time": 1, }, @@ -23924,7 +24008,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "init no package json", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw an error if there is no package.json file", @@ -23935,16 +24019,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has-jest-config-file-js ask the user whether to override config or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 0, }, @@ -23952,16 +24036,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has-jest-config-file-ts ask the user whether to override config or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 0, }, @@ -23969,16 +24053,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has-jest-config-file-mjs ask the user whether to override config or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 1, }, @@ -23986,16 +24070,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has-jest-config-file-cjs ask the user whether to override config or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 1, }, @@ -24003,16 +24087,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has-jest-config-file-json ask the user whether to override config or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 0, }, @@ -24020,16 +24104,16 @@ Is good for you.\\")", }, TestGroupResult { "name": "init project using jest.config.ts ask the user whether he wants to use Typescript or not", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "user answered with \\"Yes\\"", + "name": "user answered with "Yes"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "user answered with \\"No\\"", + "name": "user answered with "No"", "result": "success", "time": 1, }, @@ -24037,7 +24121,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "init has jest config in package.json", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should ask the user whether to override config or not", @@ -24047,11 +24131,11 @@ Is good for you.\\")", ], }, TestGroupResult { - "name": "init already has \\"jest\\" in packageJson.scripts.test", - "tests": Array [ + "name": "init already has "jest" in packageJson.scripts.test", + "tests": [ TestCaseResult { "error": undefined, - "name": "should not ask \\"test script question\\"", + "name": "should not ask "test script question"", "result": "success", "time": 0, }, @@ -24062,10 +24146,10 @@ Is good for you.\\")", "totalTime": 119, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime requireModule with no extension", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws error pointing out file with extension", @@ -24079,10 +24163,10 @@ Is good for you.\\")", "totalTime": 261, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the same value for primitive or function values", @@ -24162,10 +24246,10 @@ Is good for you.\\")", "totalTime": 86, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with jest.config.js", @@ -24179,10 +24263,10 @@ Is good for you.\\")", "totalTime": 138, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "creates a process object that looks like the original one", @@ -24191,7 +24275,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "fakes require(\\"process\\") so it is equal to \\"global.process\\"", + "name": "fakes require("process") so it is equal to "global.process"", "result": "success", "time": 0, }, @@ -24214,10 +24298,10 @@ Is good for you.\\")", "totalTime": 81, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "instruments files", @@ -24231,10 +24315,10 @@ Is good for you.\\")", "totalTime": 275, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "runJest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "when watch is set then exit process", @@ -24254,10 +24338,10 @@ Is good for you.\\")", "totalTime": 261, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Replaceable constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "init with object", @@ -24286,7 +24370,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Replaceable get", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "get object item", @@ -24309,7 +24393,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Replaceable set", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "set object item", @@ -24332,7 +24416,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Replaceable forEach", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "object forEach", @@ -24361,7 +24445,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "Replaceable isReplaceable", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true if two object types equal and support", @@ -24387,10 +24471,10 @@ Is good for you.\\")", "totalTime": 111, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to milliseconds", @@ -24464,10 +24548,10 @@ Is good for you.\\")", "totalTime": 82, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Jest Worker Process Integration", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls a single method from the worker", @@ -24511,10 +24595,10 @@ Is good for you.\\")", "totalTime": 114, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "worker", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "parses JavaScript files and extracts module information", @@ -24564,10 +24648,10 @@ Is good for you.\\")", "totalTime": 100, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "printDiffOrStringify", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "expected is empty and received is single line", @@ -24614,7 +24698,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "printDiffOrStringify MAX_DIFF_STRING_LENGTH", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "both are less", @@ -24637,7 +24721,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "printDiffOrStringify asymmetricMatcher", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "minimal test", @@ -24711,10 +24795,10 @@ Is good for you.\\")", "totalTime": 114, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getPath()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "property exists", @@ -24761,22 +24845,22 @@ Is good for you.\\")", }, TestGroupResult { "name": "getObjectSubset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "expect(getObjectSubset({\\"a\\": \\"b\\", \\"c\\": \\"d\\"}, {\\"a\\": \\"d\\"})).toEqual({\\"a\\": \\"b\\"})", + "name": "expect(getObjectSubset({"a": "b", "c": "d"}, {"a": "d"})).toEqual({"a": "b"})", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "expect(getObjectSubset({\\"a\\": [1, 2], \\"b\\": \\"b\\"}, {\\"a\\": [3, 4]})).toEqual({\\"a\\": [1, 2]})", + "name": "expect(getObjectSubset({"a": [1, 2], "b": "b"}, {"a": [3, 4]})).toEqual({"a": [1, 2]})", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "expect(getObjectSubset([{\\"a\\": \\"b\\", \\"c\\": \\"d\\"}], [{\\"a\\": \\"z\\"}])).toEqual([{\\"a\\": \\"b\\"}])", + "name": "expect(getObjectSubset([{"a": "b", "c": "d"}], [{"a": "z"}])).toEqual([{"a": "b"}])", "result": "success", "time": 1, }, @@ -24788,7 +24872,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "expect(getObjectSubset({\\"a\\": [1]}, {\\"a\\": [1, 2]})).toEqual({\\"a\\": [1]})", + "name": "expect(getObjectSubset({"a": [1]}, {"a": [1, 2]})).toEqual({"a": [1]})", "result": "success", "time": 0, }, @@ -24802,7 +24886,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "getObjectSubset returns the object instance if the subset has no extra properties", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Date", @@ -24813,7 +24897,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "getObjectSubset returns the subset instance if its property values are equal", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Object", @@ -24824,7 +24908,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "getObjectSubset returns the subset instance if its property values are equal Uint8Array", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "expected", @@ -24841,7 +24925,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "getObjectSubset calculating subsets of objects with circular references", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "simple circular references", @@ -24858,7 +24942,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "emptyObject()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "matches an empty object", @@ -24881,7 +24965,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "subsetEquality()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "matching object returns true", @@ -24916,7 +25000,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "subsetEquality() matching subsets with circular references", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "simple circular references", @@ -24939,7 +25023,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "iterableEquality", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns true when given circular iterators", @@ -25013,10 +25097,10 @@ Is good for you.\\")", "totalTime": 147, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the same value for primitive or function values", @@ -25090,10 +25174,10 @@ Is good for you.\\")", "totalTime": 49, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "isError", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not assume objects are errors", @@ -25125,10 +25209,10 @@ Is good for you.\\")", "totalTime": 43, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": ".isPrimitive()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns true when given primitive value of: null", @@ -25227,7 +25311,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "returns false when given non primitive value of: \\"2021-01-24T19:22:19.272Z\\"", + "name": "returns false when given non primitive value of: "2021-01-24T19:22:19.272Z"", "result": "success", "time": 0, }, @@ -25244,10 +25328,10 @@ Is good for you.\\")", "totalTime": 36, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "node crawler", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "crawls for files based on patterns", @@ -25280,7 +25364,7 @@ Is good for you.\\")", }, TestCaseResult { "error": undefined, - "name": "uses node fs APIs if \\"forceNodeFilesystemAPI\\" is set to true, regardless of platform", + "name": "uses node fs APIs if "forceNodeFilesystemAPI" is set to true, regardless of platform", "result": "success", "time": 6, }, @@ -25300,7 +25384,7 @@ Is good for you.\\")", }, TestGroupResult { "name": "node crawler readdir withFileTypes support", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls lstat for directories and symlinks if readdir withFileTypes is not supported", @@ -25320,13 +25404,13 @@ Is good for you.\\")", "totalTime": 170, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "run for \\"onlyChanged\\" and \\"changedSince\\"", + "name": "run for "onlyChanged" and "changedSince"", "result": "success", "time": 1464, }, @@ -25367,14 +25451,14 @@ Is good for you.\\")", "time": 7023, }, TestCaseResult { - "error": Object { + "error": { "details": "Error: expect(received).toMatch(expected) -Expected pattern: /PASS __tests__(\\\\/|\\\\\\\\)file2.test.js/ -Received string: \\"· +Expected pattern: /PASS __tests__(\\/|\\\\)file2.test.js/ +Received string: "· ● Test suite failed to run· abort: empty revision range -\\" +" at Object.toMatch (/home/dorny/dorny/jest/e2e/__tests__/onlyChanged.test.ts:360:18) at Promise.then.completed (/home/dorny/dorny/jest/packages/jest-circus/build/utils.js:307:28) at new Promise () @@ -25405,10 +25489,10 @@ Received string: \\"· "totalTime": 22281, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "joinAlignedDiffsExpand", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "first line is empty common", @@ -25419,7 +25503,7 @@ Received string: \\"· }, TestGroupResult { "name": "joinAlignedDiffsNoExpand", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "patch 0 with context 1 and change at start and end", @@ -25457,10 +25541,10 @@ Received string: \\"· "totalTime": 44, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "SnapshotInteractiveMode", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is inactive at construction", @@ -25546,10 +25630,10 @@ Received string: \\"· "totalTime": 89, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime statics", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Runtime.createHasteMap passes correct ignore files to HasteMap", @@ -25569,10 +25653,10 @@ Received string: \\"· "totalTime": 162, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getAlignedDiffs lines", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "change preceding and following common", @@ -25607,7 +25691,7 @@ Received string: \\"· }, TestGroupResult { "name": "getAlignedDiffs newline", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "delete only", @@ -25648,7 +25732,7 @@ Received string: \\"· }, TestGroupResult { "name": "getAlignedDiffs substrings first", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "common when both current change lines are empty", @@ -25677,7 +25761,7 @@ Received string: \\"· }, TestGroupResult { "name": "getAlignedDiffs substrings middle", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is empty in delete between common", @@ -25706,7 +25790,7 @@ Received string: \\"· }, TestGroupResult { "name": "getAlignedDiffs substrings last", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is empty in delete at end", @@ -25729,7 +25813,7 @@ Received string: \\"· }, TestGroupResult { "name": "getAlignedDiffs strings", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "change at start and delete or insert at end", @@ -25749,10 +25833,10 @@ Received string: \\"· "totalTime": 72, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": ".assertions()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not throw", @@ -25775,7 +25859,7 @@ Received string: \\"· }, TestGroupResult { "name": ".hasAssertions()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not throw if there is an assertion", @@ -25801,10 +25885,10 @@ Received string: \\"· "totalTime": 60, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getPlatformExtension", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should get platform ext", @@ -25818,10 +25902,10 @@ Received string: \\"· "totalTime": 35, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "isRegExpSupported", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true when passing valid regular expression", @@ -25841,10 +25925,10 @@ Received string: \\"· "totalTime": 31, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "stack trace points to correct location when using matchers", @@ -25870,10 +25954,10 @@ Received string: \\"· "totalTime": 69, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Jest Worker Integration", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls a single method from the worker", @@ -25911,10 +25995,10 @@ Received string: \\"· "totalTime": 62, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "is valid when it is a file inside roots", @@ -25940,10 +26024,10 @@ Received string: \\"· "totalTime": 166, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ErrorWithStack", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls Error.captureStackTrace with given callsite when capture exists", @@ -25957,10 +26041,10 @@ Received string: \\"· "totalTime": 41, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Returns true when running on interactive environment", @@ -25980,10 +26064,10 @@ Received string: \\"· "totalTime": 35, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "diffStringsRaw", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "one-line with cleanup", @@ -26003,10 +26087,10 @@ Received string: \\"· "totalTime": 55, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works like micromatch with only positive globs", @@ -26038,10 +26122,10 @@ Received string: \\"· "totalTime": 56, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouldRunInBand() - should return true for runInBand mode", @@ -26121,10 +26205,10 @@ Received string: \\"· "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the passed object", @@ -26144,10 +26228,10 @@ Received string: \\"· "totalTime": 68, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getMockName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "extracts mock name from file path", @@ -26161,10 +26245,10 @@ Received string: \\"· "totalTime": 22, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "WorkerPool", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create a ChildProcessWorker and send to it", @@ -26190,10 +26274,10 @@ Received string: \\"· "totalTime": 51, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "dependencyExtractor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not extract dependencies inside comments", @@ -26291,10 +26375,10 @@ Received string: \\"· "totalTime": 56, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "normalizePathSep", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does nothing on posix", @@ -26314,10 +26398,10 @@ Received string: \\"· "totalTime": 35, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "fastPath.relative", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should get relative paths inside the root", @@ -26340,7 +26424,7 @@ Received string: \\"· }, TestGroupResult { "name": "fastPath.resolve", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should get the absolute path for paths inside the root", @@ -26360,10 +26444,10 @@ Received string: \\"· "totalTime": 29, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "FailedTestsCache", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should filter tests", @@ -26377,10 +26461,10 @@ Received string: \\"· "totalTime": 25, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "getNoTestsFoundMessage", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns correct message when monitoring only failures", @@ -26418,10 +26502,10 @@ Received string: \\"· "totalTime": 61, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Common globals", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "check process", @@ -26435,10 +26519,10 @@ Received string: \\"· "totalTime": 22, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints the jest version", @@ -26464,10 +26548,10 @@ Received string: \\"· "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "not a Promise: ", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "undefined", @@ -26494,7 +26578,7 @@ Received string: \\"· }, TestCaseResult { "error": undefined, - "name": "\\"1337\\"", + "name": ""1337"", "result": "success", "time": 0, }, @@ -26520,7 +26604,7 @@ Received string: \\"· }, TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a resolved Promise", @@ -26540,10 +26624,10 @@ Received string: \\"· "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should remove jest config if exists", @@ -26575,10 +26659,10 @@ Received string: \\"· "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Symbol in objects", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should compare objects with Symbol keys", @@ -26604,10 +26688,10 @@ Received string: \\"· "totalTime": 33, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "stub", @@ -26621,10 +26705,10 @@ Received string: \\"· "totalTime": 37, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "stub", @@ -26638,10 +26722,10 @@ Received string: \\"· "totalTime": 19, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "dummy-test", @@ -26655,10 +26739,10 @@ Received string: \\"· "totalTime": 31, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should copy dom element", @@ -26678,10 +26762,10 @@ Received string: \\"· "totalTime": 48, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "on node ^12.16.0 || >=13.7.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs TS test with native ESM", @@ -26695,10 +26779,10 @@ Received string: \\"· "totalTime": 956, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "maps code coverage against original source", @@ -26712,10 +26796,10 @@ Received string: \\"· "totalTime": 12701, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "globalTeardown is triggered once after all test suites", @@ -26765,10 +26849,10 @@ Received string: \\"· "totalTime": 11886, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "--listTests doesn't duplicate the test files", @@ -26783,7 +26867,7 @@ Received string: \\"· }, TestCaseResult { "error": undefined, - "name": "\\"No tests found\\" message for projects", + "name": ""No tests found" message for projects", "result": "success", "time": 977, }, @@ -26845,7 +26929,7 @@ Received string: \\"· }, TestGroupResult { "name": "doesn't bleed module file extensions resolution with multiple workers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "external config files", @@ -26865,10 +26949,10 @@ Received string: \\"· "totalTime": 16360, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "basic support", @@ -26930,10 +27014,10 @@ Received string: \\"· "totalTime": 17025, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints message about flag on slow tests", @@ -26968,7 +27052,7 @@ Received string: \\"· }, TestGroupResult { "name": "on node >=11.10.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not report ELD histograms", @@ -26979,7 +27063,7 @@ Received string: \\"· }, TestGroupResult { "name": "notify", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not report --notify flag", @@ -26990,7 +27074,7 @@ Received string: \\"· }, TestGroupResult { "name": "on node >=11", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not report timeouts using unref", @@ -27004,10 +27088,10 @@ Received string: \\"· "totalTime": 7528, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "not throwing Error objects", @@ -27057,10 +27141,10 @@ Received string: \\"· "totalTime": 10353, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "console printing", @@ -27110,10 +27194,10 @@ Received string: \\"· "totalTime": 8071.999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "basic test constructs", @@ -27181,10 +27265,10 @@ Received string: \\"· "totalTime": 7505, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exits with 1 if coverage threshold is not met", @@ -27222,10 +27306,10 @@ Received string: \\"· "totalTime": 4868, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints a message with path pattern at the end", @@ -27239,10 +27323,10 @@ Received string: \\"· "totalTime": 3076, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Dynamic test filtering", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses the default JSON option", @@ -27292,10 +27376,10 @@ Received string: \\"· "totalTime": 5422, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Given a config with two named projects, first-project and second-project when Jest is started with \`--selectProjects first-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the first project only", @@ -27312,7 +27396,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two named projects, first-project and second-project when Jest is started with \`--selectProjects second-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the second project only", @@ -27329,7 +27413,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two named projects, first-project and second-project when Jest is started with \`--selectProjects first-project second-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the first and second projects", @@ -27346,7 +27430,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two named projects, first-project and second-project when Jest is started without providing \`--selectProjects\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the first and second projects", @@ -27363,7 +27447,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two named projects, first-project and second-project when Jest is started with \`--selectProjects third-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails", @@ -27380,7 +27464,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two projects, first-project and an unnamed project when Jest is started with \`--selectProjects first-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the first project only", @@ -27403,7 +27487,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two projects, first-project and an unnamed project when Jest is started without providing \`--selectProjects\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs the tests in the first and second projects", @@ -27420,7 +27504,7 @@ Received string: \\"· }, TestGroupResult { "name": "Given a config with two projects, first-project and an unnamed project when Jest is started with \`--selectProjects third-project\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails", @@ -27446,10 +27530,10 @@ Received string: \\"· "totalTime": 5236, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite without mock name, mock called", @@ -27505,10 +27589,10 @@ Received string: \\"· "totalTime": 6771, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Stack Trace", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints a stack trace for runtime errors", @@ -27558,10 +27642,10 @@ Received string: \\"· "totalTime": 4725, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with passing tests", @@ -27611,10 +27695,10 @@ Received string: \\"· "totalTime": 4721, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works fine when function throws error", @@ -27646,10 +27730,10 @@ Received string: \\"· "totalTime": 3562, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not re-run tests when only access time is modified", @@ -27663,10 +27747,10 @@ Received string: \\"· "totalTime": 4370, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "successfully runs the tests inside \`pnp/\`", @@ -27680,10 +27764,10 @@ Received string: \\"· "totalTime": 2715, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "errors if describe returns a Promise", @@ -27709,10 +27793,10 @@ Received string: \\"· "totalTime": 2389, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Wrong globals for environment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "print useful error for window", @@ -27750,10 +27834,10 @@ Received string: \\"· "totalTime": 3877, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "setupFilesAfterEnv", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "requires multiple setup files before each file in the suite", @@ -27773,10 +27857,10 @@ Received string: \\"· "totalTime": 1967, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "No tests are found", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails the test suite in standard situation", @@ -27814,10 +27898,10 @@ Received string: \\"· "totalTime": 2739, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with custom matchers", @@ -27837,10 +27921,10 @@ Received string: \\"· "totalTime": 1539, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "print correct error message with nested test definitions outside describe", @@ -27872,10 +27956,10 @@ Received string: \\"· "totalTime": 4641, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite with auto-clear", @@ -27895,10 +27979,10 @@ Received string: \\"· "totalTime": 1681, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exits the process after test are done but before timers complete", @@ -27912,10 +27996,10 @@ Received string: \\"· "totalTime": 2208, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exits with a specified code when test fail", @@ -27935,10 +28019,10 @@ Received string: \\"· "totalTime": 4476, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "", @@ -27952,10 +28036,10 @@ Received string: \\"· "totalTime": 967, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "run timers after resetAllMocks test", @@ -27975,10 +28059,10 @@ Received string: \\"· "totalTime": 1878, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "triggers setup/teardown hooks", @@ -27992,10 +28076,10 @@ Received string: \\"· "totalTime": 1493, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "show error message with matching files", @@ -28015,10 +28099,10 @@ Received string: \\"· "totalTime": 1263, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with nested event loops", @@ -28032,10 +28116,10 @@ Received string: \\"· "totalTime": 1422, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "no tests found message is redirected to stderr", @@ -28049,10 +28133,10 @@ Received string: \\"· "totalTime": 1352, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work without error", @@ -28066,10 +28150,10 @@ Received string: \\"· "totalTime": 1361, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "console printing", @@ -28083,10 +28167,10 @@ Received string: \\"· "totalTime": 1341, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs tests in only test.js and spec.js", @@ -28100,10 +28184,10 @@ Received string: \\"· "totalTime": 1008.9999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "\`require.main\` on using \`jest.isolateModules\` should not be undefined", @@ -28117,10 +28201,10 @@ Received string: \\"· "totalTime": 976, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "jest --clearCache", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "normal run results in cache directory being written", @@ -28140,10 +28224,10 @@ Received string: \\"· "totalTime": 1004, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runtime Internal Module Registry", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "correctly makes use of internal module registry when requiring modules", @@ -28157,10 +28241,10 @@ Received string: \\"· "totalTime": 1202, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "resolve node module", @@ -28174,10 +28258,10 @@ Received string: \\"· "totalTime": 943, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "setImmediate", @@ -28191,10 +28275,10 @@ Received string: \\"· "totalTime": 904, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "JSON Reporter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails the test suite if it contains no tests", @@ -28208,10 +28292,10 @@ Received string: \\"· "totalTime": 885, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite with test cases that contain malformed sourcemaps", @@ -28225,13 +28309,13 @@ Received string: \\"· "totalTime": 858, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "useRealTimers cancels \\"timers\\": \\"fake\\" for whole test file", + "name": "useRealTimers cancels "timers": "fake" for whole test file", "result": "success", "time": 986, }, @@ -28242,10 +28326,10 @@ Received string: \\"· "totalTime": 1018, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "can redefine global", @@ -28259,10 +28343,10 @@ Received string: \\"· "totalTime": 40, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "run Jest programmatically cjs", @@ -28282,10 +28366,10 @@ Received string: \\"· "totalTime": 575, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Symbol deletion", @@ -28299,10 +28383,10 @@ Received string: \\"· "totalTime": 49, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not warn when a mock file changes", @@ -28316,10 +28400,10 @@ Received string: \\"· "totalTime": 379, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "error when rootDir does not exist", @@ -28351,10 +28435,10 @@ Received string: \\"· "totalTime": 627, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "\`done()\` works properly in hooks", @@ -28368,10 +28452,10 @@ Received string: \\"· "totalTime": 855, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls asynchronous handleTestEvent in testEnvironment", @@ -28385,10 +28469,10 @@ Received string: \\"· "totalTime": 1507, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "moduleNameMapper wrong configuration", @@ -28426,10 +28510,10 @@ Received string: \\"· "totalTime": 5395, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Custom Reporters Integration", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "valid string format for adding reporters", @@ -28491,10 +28575,10 @@ Received string: \\"· "totalTime": 6553, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "--findRelatedTests flag", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs tests related to filename", @@ -28532,10 +28616,10 @@ Received string: \\"· "totalTime": 6230, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Environment override", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses jsdom when specified", @@ -28564,7 +28648,7 @@ Received string: \\"· }, TestGroupResult { "name": "Environment equivalent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses jsdom", @@ -28584,10 +28668,10 @@ Received string: \\"· "totalTime": 5221, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "globalSetup is triggered once before all test suites", @@ -28655,10 +28739,10 @@ Received string: \\"· "totalTime": 13926, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints a warning if a worker is force exited", @@ -28678,10 +28762,10 @@ Received string: \\"· "totalTime": 4751, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "successfully runs the tests inside \`babel-plugin-jest-hoist/\`", @@ -28695,10 +28779,10 @@ Received string: \\"· "totalTime": 6249, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "code coverage for transform instrumented code", @@ -28712,10 +28796,10 @@ Received string: \\"· "totalTime": 5029, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not work on jest-circus", @@ -28747,10 +28831,10 @@ Received string: \\"· "totalTime": 71, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "successfully transpiles async", @@ -28764,10 +28848,10 @@ Received string: \\"· "totalTime": 4127, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works fine when function throws error", @@ -28805,10 +28889,10 @@ Received string: \\"· "totalTime": 3524, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with all statuses", @@ -28846,10 +28930,10 @@ Received string: \\"· "totalTime": 3573, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "onlyFailures flag works in non-watch mode", @@ -28863,10 +28947,10 @@ Received string: \\"· "totalTime": 2893, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports json preset", @@ -28886,10 +28970,10 @@ Received string: \\"· "totalTime": 1966, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with passing tests", @@ -28909,10 +28993,10 @@ Received string: \\"· "totalTime": 2732, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "babel-jest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs transpiled code", @@ -28929,7 +29013,7 @@ Received string: \\"· }, TestGroupResult { "name": "babel-jest ignored", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "tells user to match ignored files", @@ -28940,7 +29024,7 @@ Received string: \\"· }, TestGroupResult { "name": "babel-jest with manual transformer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs transpiled code", @@ -28951,7 +29035,7 @@ Received string: \\"· }, TestGroupResult { "name": "no babel-jest", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails with syntax error on flow types", @@ -28968,7 +29052,7 @@ Received string: \\"· }, TestGroupResult { "name": "custom transformer", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "proprocesses files", @@ -28985,7 +29069,7 @@ Received string: \\"· }, TestGroupResult { "name": "multiple-transformers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "transforms dependencies using specific transformers", @@ -28996,7 +29080,7 @@ Received string: \\"· }, TestGroupResult { "name": "ecmascript-modules-support", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs transpiled code", @@ -29007,7 +29091,7 @@ Received string: \\"· }, TestGroupResult { "name": "transformer-config", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs transpiled code", @@ -29024,7 +29108,7 @@ Received string: \\"· }, TestGroupResult { "name": "transformer caching", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not rerun transform within worker", @@ -29035,7 +29119,7 @@ Received string: \\"· }, TestGroupResult { "name": "transform-environment", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should transform the environment", @@ -29046,7 +29130,7 @@ Received string: \\"· }, TestGroupResult { "name": "transform-runner", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should transform runner", @@ -29057,7 +29141,7 @@ Received string: \\"· }, TestGroupResult { "name": "transform-testrunner", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should transform testRunner", @@ -29071,10 +29155,10 @@ Received string: \\"· "totalTime": 26740, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "chai assertion errors should display properly", @@ -29088,10 +29172,10 @@ Received string: \\"· "totalTime": 1902, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "processes stack traces and code frames with source maps with coverage", @@ -29105,10 +29189,10 @@ Received string: \\"· "totalTime": 2444, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "run prioritySequence first sync", @@ -29134,10 +29218,10 @@ Received string: \\"· "totalTime": 2757, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Correct BeforeAll run", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ensures the BeforeAll of ignored suite is not run", @@ -29151,10 +29235,10 @@ Received string: \\"· "totalTime": 958, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Fake promises", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be possible to resolve with fake timers using immediates", @@ -29174,10 +29258,10 @@ Received string: \\"· "totalTime": 1716, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "processes stack traces and code frames with source maps", @@ -29191,10 +29275,10 @@ Received string: \\"· "totalTime": 2185, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "successfully runs tests with dynamic dependencies", @@ -29208,10 +29292,10 @@ Received string: \\"· "totalTime": 847, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "overriding native promise does not freeze Jest", @@ -29231,10 +29315,10 @@ Received string: \\"· "totalTime": 2045.9999999999998, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Tests are executed only once even in an MPR", @@ -29248,10 +29332,10 @@ Received string: \\"· "totalTime": 976, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "module.parent should be null in test files", @@ -29265,10 +29349,10 @@ Received string: \\"· "totalTime": 886, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints useful error for requires after test is done", @@ -29282,10 +29366,10 @@ Received string: \\"· "totalTime": 921, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite with invalid assertions in afterAll", @@ -29299,10 +29383,10 @@ Received string: \\"· "totalTime": 861, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exits the process after test are done but before timers complete", @@ -29316,10 +29400,10 @@ Received string: \\"· "totalTime": 298, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "JSON is available in the global scope", @@ -29339,10 +29423,10 @@ Received string: \\"· "totalTime": 29, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testNamePattern", @@ -29356,10 +29440,10 @@ Received string: \\"· "totalTime": 910, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "jest --debug", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "outputs debugging info before running the test", @@ -29373,10 +29457,10 @@ Received string: \\"· "totalTime": 899, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "imported globals", @@ -29390,10 +29474,10 @@ Received string: \\"· "totalTime": 1043, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "use the custom resolver", @@ -29407,10 +29491,10 @@ Received string: \\"· "totalTime": 826, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "handles circular inequality properly", @@ -29424,10 +29508,10 @@ Received string: \\"· "totalTime": 1451, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "globals are undefined if passed \`false\` from CLI", @@ -29447,10 +29531,10 @@ Received string: \\"· "totalTime": 1860, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "correctly skip \`beforeAll\`s in skipped tests", @@ -29464,10 +29548,10 @@ Received string: \\"· "totalTime": 1061, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with custom inline snapshot matchers", @@ -29481,10 +29565,10 @@ Received string: \\"· "totalTime": 2206, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Regex Char In Path", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "parses paths containing regex chars correctly", @@ -29498,10 +29582,10 @@ Received string: \\"· "totalTime": 962, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Coverage Report", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "outputs coverage report", @@ -29512,7 +29596,7 @@ Received string: \\"· }, TestGroupResult { "name": "File path not found in mulit-project scenario", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "outputs coverage report", @@ -29526,10 +29610,10 @@ Received string: \\"· "totalTime": 1063, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "test config is without transform", @@ -29540,7 +29624,7 @@ Received string: \\"· }, TestGroupResult { "name": "on node ^12.16.0 || >=13.7.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs test with native ESM", @@ -29551,7 +29635,7 @@ Received string: \\"· }, TestGroupResult { "name": "on node >=14.3.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports top-level await", @@ -29565,10 +29649,10 @@ Received string: \\"· "totalTime": 905, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with passing tests", @@ -29588,10 +29672,10 @@ Received string: \\"· "totalTime": 968, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should transform linked modules", @@ -29605,10 +29689,10 @@ Received string: \\"· "totalTime": 783, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testNamePattern", @@ -29622,10 +29706,10 @@ Received string: \\"· "totalTime": 859, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mocks async functions", @@ -29639,10 +29723,10 @@ Received string: \\"· "totalTime": 55, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "reports the correct file size", @@ -29662,10 +29746,10 @@ Received string: \\"· "totalTime": 397, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defining tests and hooks asynchronously throws", @@ -29679,10 +29763,10 @@ Received string: \\"· "totalTime": 869, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls testEnvironment handleTestEvent", @@ -29696,10 +29780,10 @@ Received string: \\"· "totalTime": 1501, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "\`done()\` should not be called more than once", @@ -29713,10 +29797,10 @@ Received string: \\"· "totalTime": 882, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "hook in empty describe", @@ -29748,10 +29832,10 @@ Received string: \\"· "totalTime": 2886, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not work on jest-circus", @@ -29909,10 +29993,10 @@ Received string: \\"· "totalTime": 56, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Test Retries", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "retries failed tests", @@ -29944,10 +30028,10 @@ Received string: \\"· "totalTime": 3277, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with jest.config.ts", @@ -29985,10 +30069,10 @@ Received string: \\"· "totalTime": 14322, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "outputs coverage report", @@ -30068,10 +30152,10 @@ Received string: \\"· "totalTime": 22264, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "basic support", @@ -30151,10 +30235,10 @@ Received string: \\"· "totalTime": 23917, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders correctly", @@ -30186,10 +30270,10 @@ Received string: \\"· "totalTime": 8559, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with a single snapshot", @@ -30215,10 +30299,10 @@ Received string: \\"· "totalTime": 4670, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "exceeds the timeout", @@ -30250,10 +30334,10 @@ Received string: \\"· "totalTime": 4029, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "empty external", @@ -30279,10 +30363,10 @@ Received string: \\"· "totalTime": 3544, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "async jasmine", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with beforeAll", @@ -30380,10 +30464,10 @@ Received string: \\"· "totalTime": 28291, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "config as JSON", @@ -30427,10 +30511,10 @@ Received string: \\"· "totalTime": 3945, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "fails a test that terminates the worker with a fatal error", @@ -30444,10 +30528,10 @@ Received string: \\"· "totalTime": 3167, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with a single snapshot", @@ -30467,19 +30551,19 @@ Received string: \\"· "totalTime": 4435, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "can press \\"p\\" to filter by file name", + "name": "can press "p" to filter by file name", "result": "success", "time": 1471, }, TestCaseResult { "error": undefined, - "name": "can press \\"t\\" to filter by test name", + "name": "can press "t" to filter by test name", "result": "success", "time": 1775, }, @@ -30490,10 +30574,10 @@ Received string: \\"· "totalTime": 3503, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "triggers unexpected token error message for non-JS assets", @@ -30519,10 +30603,10 @@ Received string: \\"· "totalTime": 3411, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "understands dependencies using jest.requireMock", @@ -30536,10 +30620,10 @@ Received string: \\"· "totalTime": 2119, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "instruments and collects coverage for typescript files", @@ -30553,10 +30637,10 @@ Received string: \\"· "totalTime": 2893, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with jest.config.js", @@ -30582,10 +30666,10 @@ Received string: \\"· "totalTime": 2134, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "\`require.main\` on using \`--resetModules='true'\` should not be undefined", @@ -30605,10 +30689,10 @@ Received string: \\"· "totalTime": 1961, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "modern implementation of fake timers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be possible to use modern implementation from config", @@ -30628,10 +30712,10 @@ Received string: \\"· "totalTime": 1680, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "runs tests by exact path", @@ -30645,10 +30729,10 @@ Received string: \\"· "totalTime": 1999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "respects testEnvironment docblock", @@ -30662,10 +30746,10 @@ Received string: \\"· "totalTime": 1628, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with concurrent.each", @@ -30685,10 +30769,10 @@ Received string: \\"· "totalTime": 1591, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite with auto-restore", @@ -30708,10 +30792,10 @@ Received string: \\"· "totalTime": 1797, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "JSON Reporter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "writes test result to sum.result.json", @@ -30731,10 +30815,10 @@ Received string: \\"· "totalTime": 1514, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "suite with auto-reset", @@ -30754,13 +30838,13 @@ Received string: \\"· "totalTime": 1666, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "runs only \\"it.only\\" tests", + "name": "runs only "it.only" tests", "result": "success", "time": 834, }, @@ -30771,13 +30855,13 @@ Received string: \\"· "totalTime": 888, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "can press \\"f\\" to run only failed tests", + "name": "can press "f" to run only failed tests", "result": "success", "time": 1341, }, @@ -30788,10 +30872,10 @@ Received string: \\"· "totalTime": 1394, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not work on jest-circus", @@ -30802,7 +30886,7 @@ Received string: \\"· }, TestGroupResult { "name": "Correct beforeEach order", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "ensures the correct order for beforeEach", @@ -30816,10 +30900,10 @@ Received string: \\"· "totalTime": 55, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with injected globals", @@ -30833,10 +30917,10 @@ Received string: \\"· "totalTime": 1010.9999999999999, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Snapshot serializers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders snapshot", @@ -30856,10 +30940,10 @@ Received string: \\"· "totalTime": 2065, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "defaults to null for location", @@ -30879,10 +30963,10 @@ Received string: \\"· "totalTime": 1764, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints console.logs when run with forceExit", @@ -30896,10 +30980,10 @@ Received string: \\"· "totalTime": 793, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not require project modules from inside node_modules", @@ -30913,10 +30997,10 @@ Received string: \\"· "totalTime": 833, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "produces code coverage for uncovered files without transformer", @@ -30930,10 +31014,10 @@ Received string: \\"· "totalTime": 1075, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "CLI accepts exact file names if matchers matched", @@ -30953,10 +31037,10 @@ Received string: \\"· "totalTime": 1230, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "on node >=12.2.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "\`require.main\` not undefined after createRequire", @@ -30970,10 +31054,10 @@ Received string: \\"· "totalTime": 966, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "jest.resetModules should not error when _isMockFunction is defined but not boolean", @@ -30987,13 +31071,13 @@ Received string: \\"· "totalTime": 926, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "can press \\"u\\" to update snapshots", + "name": "can press "u" to update snapshots", "result": "success", "time": 993, }, @@ -31004,10 +31088,10 @@ Received string: \\"· "totalTime": 1075, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "mock works with generator", @@ -31021,10 +31105,10 @@ Received string: \\"· "totalTime": 1027, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "require.resolve.paths", @@ -31038,10 +31122,10 @@ Received string: \\"· "totalTime": 1155, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints coverage with missing sourcemaps", @@ -31061,10 +31145,10 @@ Received string: \\"· "totalTime": 2412, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "require.resolve with paths", @@ -31078,10 +31162,10 @@ Received string: \\"· "totalTime": 1170, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "logs memory usage", @@ -31095,10 +31179,10 @@ Received string: \\"· "totalTime": 884, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "provides \`require.main\` set to test suite module", @@ -31112,10 +31196,10 @@ Received string: \\"· "totalTime": 1137, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "store snapshot even if fs is mocked", @@ -31129,10 +31213,10 @@ Received string: \\"· "totalTime": 883, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Snapshot serializers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders snapshot", @@ -31146,10 +31230,10 @@ Received string: \\"· "totalTime": 838, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "AppComponent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create the app", @@ -31175,10 +31259,10 @@ Received string: \\"· "totalTime": 654, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints a usable stack trace even if no Error.captureStackTrace", @@ -31192,10 +31276,10 @@ Received string: \\"· "totalTime": 899, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "testNamePattern skipped", @@ -31209,10 +31293,10 @@ Received string: \\"· "totalTime": 991, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "that the failureDetails property is set", @@ -31226,10 +31310,10 @@ Received string: \\"· "totalTime": 907, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Custom snapshot resolver", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Resolves snapshot files using custom resolver", @@ -31243,10 +31327,10 @@ Received string: \\"· "totalTime": 823, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints stack trace pointing to process.exit call", @@ -31260,10 +31344,10 @@ Received string: \\"· "totalTime": 1070, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "supports NODE_PATH", @@ -31277,10 +31361,10 @@ Received string: \\"· "totalTime": 866, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Verbose Reporter", @@ -31294,10 +31378,10 @@ Received string: \\"· "totalTime": 683, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "--listTests flag", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "causes tests to be printed in different lines", @@ -31317,10 +31401,10 @@ Received string: \\"· "totalTime": 945, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "allows retrieving the current domain", @@ -31334,10 +31418,10 @@ Received string: \\"· "totalTime": 908, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "CheckboxWithLabel changes the text after click", @@ -31351,10 +31435,10 @@ Received string: \\"· "totalTime": 469, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Service: DataService", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create service", @@ -31374,10 +31458,10 @@ Received string: \\"· "totalTime": 431, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "prints useful error for environment methods after test is done", @@ -31391,10 +31475,10 @@ Received string: \\"· "totalTime": 892, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "reads config from cjs file", @@ -31405,7 +31489,7 @@ Received string: \\"· }, TestGroupResult { "name": "on node ^12.17.0 || >=13.2.0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "reads config from mjs file", @@ -31425,10 +31509,10 @@ Received string: \\"· "totalTime": 526, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "CheckboxWithLabel changes the text after click", @@ -31442,10 +31526,10 @@ Received string: \\"· "totalTime": 434, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "define mock per test", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "uses mocked module", @@ -31465,10 +31549,10 @@ Received string: \\"· "totalTime": 116, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should aggregate docs from collection", @@ -31482,10 +31566,10 @@ Received string: \\"· "totalTime": 236, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders correctly", @@ -31517,10 +31601,10 @@ Received string: \\"· "totalTime": 181, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "CheckboxWithLabel changes the text after click", @@ -31534,10 +31618,10 @@ Received string: \\"· "totalTime": 227, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "CheckboxWithLabel changes the text after click", @@ -31551,10 +31635,10 @@ Received string: \\"· "totalTime": 256, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "--showConfig outputs config info and exits", @@ -31568,10 +31652,10 @@ Received string: \\"· "totalTime": 195, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "renders correctly", @@ -31585,10 +31669,10 @@ Received string: \\"· "totalTime": 62, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "schedules a 10-second timer after 1 second", @@ -31602,10 +31686,10 @@ Received string: \\"· "totalTime": 94, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "calls into $.ajax with the correct params", @@ -31625,10 +31709,10 @@ Received string: \\"· "totalTime": 196, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "displays a user after a click", @@ -31642,10 +31726,10 @@ Received string: \\"· "totalTime": 196, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "timerGame", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "waits 1 second before ending the game", @@ -31671,10 +31755,10 @@ Received string: \\"· "totalTime": 74, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "works with resolves", @@ -31730,10 +31814,10 @@ Received string: \\"· "totalTime": 96, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "implementation created by automock", @@ -31753,10 +31837,10 @@ Received string: \\"· "totalTime": 115, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "listFilesInDirectorySync", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "includes all files in the directory in the summary", @@ -31770,10 +31854,10 @@ Received string: \\"· "totalTime": 87, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "calc - mocks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns result from subtract", @@ -31817,10 +31901,10 @@ Received string: \\"· "totalTime": 276, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds 1 + 2 to equal 3", @@ -31834,10 +31918,10 @@ Received string: \\"· "totalTime": 78, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Service: SubService", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create service", @@ -31851,10 +31935,10 @@ Received string: \\"· "totalTime": 109, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "if orginal user model", @@ -31868,10 +31952,10 @@ Received string: \\"· "totalTime": 41, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds 1 + 2 to equal 3 in TScript", @@ -31891,10 +31975,10 @@ Received string: \\"· "totalTime": 69, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "if utils are mocked", @@ -31914,10 +31998,10 @@ Received string: \\"· "totalTime": 74, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "if lodash head is mocked", @@ -31931,10 +32015,10 @@ Received string: \\"· "totalTime": 109, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "if user model is mocked", @@ -31948,10 +32032,10 @@ Received string: \\"· "totalTime": 105, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds 1 + 2 to equal 3 in Typescript", @@ -31971,10 +32055,10 @@ Received string: \\"· "totalTime": 100, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "b", @@ -31988,10 +32072,10 @@ Received string: \\"· "totalTime": 21, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "subtracts 5 - 1 to equal 4 in TypeScript", @@ -32005,10 +32089,10 @@ Received string: \\"· "totalTime": 43, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does a full mock", @@ -32022,10 +32106,10 @@ Received string: \\"· "totalTime": 60, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "globals are properly defined", @@ -32039,10 +32123,10 @@ Received string: \\"· "totalTime": 31, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "original implementation", @@ -32056,10 +32140,10 @@ Received string: \\"· "totalTime": 24, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "timers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work before calling resetAllMocks", @@ -32079,10 +32163,10 @@ Received string: \\"· "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "v8 module", @@ -32096,10 +32180,10 @@ Received string: \\"· "totalTime": 30, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "timers", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work before calling resetAllMocks", @@ -32113,10 +32197,10 @@ Received string: \\"· "totalTime": 34, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does a partial mock", @@ -32130,10 +32214,10 @@ Received string: \\"· "totalTime": 215, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "d", @@ -32147,10 +32231,10 @@ Received string: \\"· "totalTime": 21, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "a", @@ -32164,10 +32248,10 @@ Received string: \\"· "totalTime": 29, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "e", @@ -32181,10 +32265,10 @@ Received string: \\"· "totalTime": 27, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "c", @@ -32198,10 +32282,10 @@ Received string: \\"· "totalTime": 42, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "errors when a test both returns a promise and takes a callback", diff --git a/__tests__/__snapshots__/mocha-json.test.ts.snap b/__tests__/__snapshots__/mocha-json.test.ts.snap index 70b4b96..4a1448c 100644 --- a/__tests__/__snapshots__/mocha-json.test.ts.snap +++ b/__tests__/__snapshots__/mocha-json.test.ts.snap @@ -1,14 +1,14 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing exports[`mocha-json tests report from ./reports/mocha-json test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/mocha-json.json", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Test 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Passing test", @@ -19,12 +19,12 @@ TestRunResult { }, TestGroupResult { "name": "Test 1 Test 1.1", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "Error: Some error - at Object.throwError (lib\\\\main.js:2:9) - at Context. (test\\\\main.test.js:15:11) + at Object.throwError (lib\\main.js:2:9) + at Context. (test\\main.test.js:15:11) at processImmediate (internal/timers.js:461:21)", "line": 2, "message": "Some error", @@ -35,12 +35,12 @@ TestRunResult { "time": 0, }, TestCaseResult { - "error": Object { + "error": { "details": "AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: false !== true - at Context. (test\\\\main.test.js:11:14) + at Context. (test\\main.test.js:11:14) at processImmediate (internal/timers.js:461:21)", "line": 11, "message": "Expected values to be strictly equal: @@ -57,11 +57,11 @@ false !== true }, TestGroupResult { "name": "Test 2", - "tests": Array [ + "tests": [ TestCaseResult { - "error": Object { + "error": { "details": "Error: Some error - at Context. (test\\\\main.test.js:22:11) + at Context. (test\\main.test.js:22:11) at processImmediate (internal/timers.js:461:21)", "line": 22, "message": "Some error", @@ -78,10 +78,10 @@ false !== true "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": null, - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "Skipped test", @@ -89,12 +89,12 @@ false !== true "time": 0, }, TestCaseResult { - "error": Object { - "details": "Error: Timeout of 1ms exceeded. For async tests and hooks, ensure \\"done()\\" is called; if returning a Promise, ensure it resolves. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\mocha\\\\test\\\\second.test.js) + "error": { + "details": "Error: Timeout of 1ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\mocha\\test\\second.test.js) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)", "line": undefined, - "message": "Timeout of 1ms exceeded. For async tests and hooks, ensure \\"done()\\" is called; if returning a Promise, ensure it resolves. (C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\mocha\\\\test\\\\second.test.js)", + "message": "Timeout of 1ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\mocha\\test\\second.test.js)", "path": undefined, }, "name": "Timeout test", @@ -115,12 +115,12 @@ false !== true exports[`mocha-json tests report from mochajs/mocha test results matches snapshot 1`] = ` TestRunResult { "path": "fixtures/external/mocha/mocha-test-results.json", - "suites": Array [ + "suites": [ TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "class BufferedWorkerPool constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should apply defaults", @@ -131,7 +131,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method run()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should deserialize the result", @@ -148,7 +148,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method run() when passed a non-string filepath", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -159,7 +159,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method run() when passed no arguments", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -170,7 +170,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method stats()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the object returned by \`workerpool.Pool#stats\`", @@ -181,10 +181,10 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method terminate() when called with \`force\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should delegate to the underlying pool w/ \\"force\\" behavior", + "name": "should delegate to the underlying pool w/ "force" behavior", "result": "success", "time": 1, }, @@ -192,10 +192,10 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool instance method terminate() when called without \`force\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should delegate to the underlying pool w/o \\"force\\" behavior", + "name": "should delegate to the underlying pool w/o "force" behavior", "result": "success", "time": 1, }, @@ -203,7 +203,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool static method create()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a BufferedWorkerPool instance", @@ -214,7 +214,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool static method create() when passed no arguments", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not throw", @@ -225,7 +225,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool static method serializeOptions()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a serialized string", @@ -236,7 +236,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool static method serializeOptions() when called multiple times with the same object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not perform serialization twice", @@ -253,7 +253,7 @@ TestRunResult { }, TestGroupResult { "name": "class BufferedWorkerPool static method serializeOptions() when passed no arguments", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not throw", @@ -267,10 +267,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "cli/config findConfig()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should look for one of the config files using findup-sync", @@ -287,7 +287,7 @@ TestRunResult { }, TestGroupResult { "name": "cli/config loadConfig() when config file parsing fails", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -297,8 +297,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".cjs\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".cjs" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the JS parser", @@ -308,8 +308,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".js\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".js" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the JS parser", @@ -319,8 +319,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".json\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".json" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the JSON parser", @@ -330,8 +330,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".jsonc\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".jsonc" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the JSON parser", @@ -341,8 +341,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".yaml\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".yaml" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the YAML parser", @@ -352,8 +352,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with \\".yml\\" extension", - "tests": Array [ + "name": "cli/config loadConfig() when parsing succeeds when supplied a filepath with ".yml" extension", + "tests": [ TestCaseResult { "error": undefined, "name": "should use the YAML parser", @@ -364,7 +364,7 @@ TestRunResult { }, TestGroupResult { "name": "cli/config loadConfig() when supplied a filepath with unsupported extension", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should use the JSON parser", @@ -378,10 +378,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "node-flags impliesNoTimeouts()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true for inspect flags", @@ -392,7 +392,7 @@ TestRunResult { }, TestGroupResult { "name": "node-flags isNodeFlag() for all allowed node env flags which conflict with mocha flags", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "--require should return false", @@ -409,7 +409,7 @@ TestRunResult { }, TestGroupResult { "name": "node-flags isNodeFlag() for all allowed node environment flags", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "--abort-on-uncaught-exception should return true", @@ -960,52 +960,52 @@ TestRunResult { }, TestGroupResult { "name": "node-flags isNodeFlag() special cases", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should return true for \\"es-staging\\"", + "name": "should return true for "es-staging"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "should return true for \\"gc-global\\"", + "name": "should return true for "gc-global"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for \\"harmony\\" itself", + "name": "should return true for "harmony" itself", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for \\"use-strict\\"", + "name": "should return true for "use-strict"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for flags starting with \\"--v8-\\"", + "name": "should return true for flags starting with "--v8-"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for flags starting with \\"harmony-\\" or \\"harmony_\\"", + "name": "should return true for flags starting with "harmony-" or "harmony_"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for flags starting with \\"preserve-symlinks\\"", + "name": "should return true for flags starting with "preserve-symlinks"", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return true for flags starting with \\"trace-\\" or \\"trace_\\"", + "name": "should return true for flags starting with "trace-" or "trace_"", "result": "success", "time": 0, }, @@ -1013,7 +1013,7 @@ TestRunResult { }, TestGroupResult { "name": "node-flags isNodeFlag() when expecting leading dashes", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should require leading dashes", @@ -1024,7 +1024,7 @@ TestRunResult { }, TestGroupResult { "name": "node-flags unparseNodeFlags()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should handle multiple v8 flags", @@ -1044,10 +1044,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { - "name": "options loadOptions() \\"extension\\" handling when user does not supply \\"extension\\" option", - "tests": Array [ + "name": "options loadOptions() "extension" handling when user does not supply "extension" option", + "tests": [ TestCaseResult { "error": undefined, "name": "should retain the default", @@ -1057,8 +1057,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() \\"extension\\" handling when user supplies \\"extension\\" option", - "tests": Array [ + "name": "options loadOptions() "extension" handling when user supplies "extension" option", + "tests": [ TestCaseResult { "error": undefined, "name": "should not concatenate the default value", @@ -1068,8 +1068,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() \\"ignore\\" handling", - "tests": Array [ + "name": "options loadOptions() "ignore" handling", + "tests": [ TestCaseResult { "error": undefined, "name": "should not split option values by comma", @@ -1079,8 +1079,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() \\"spec\\" handling when user supplies \\"spec\\" in config and positional arguments", - "tests": Array [ + "name": "options loadOptions() "spec" handling when user supplies "spec" in config and positional arguments", + "tests": [ TestCaseResult { "error": undefined, "name": "should place both - unsplitted - into the positional arguments array", @@ -1091,7 +1091,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() config priority", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should prioritize args over rc file", @@ -1113,8 +1113,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"h\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "h"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1124,8 +1124,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"help\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "help"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1135,8 +1135,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"list-interfaces\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "list-interfaces"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1146,8 +1146,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"list-reporters\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "list-reporters"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1157,8 +1157,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"V\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "V"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1168,8 +1168,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "options loadOptions() when called with a one-and-done arg \\"version\\"", - "tests": Array [ + "name": "options loadOptions() when called with a one-and-done arg "version"", + "tests": [ TestCaseResult { "error": undefined, "name": "should return basic parsed arguments and flag", @@ -1180,7 +1180,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when no parameter provided", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an object containing positional args, defaults, and anti-reloading flags", @@ -1191,7 +1191,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided package.json when called with package = false (\`--no-package\`)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not look for package.json", @@ -1214,7 +1214,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided package.json when path to package.json (\`--package \`) is invalid", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -1225,7 +1225,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided package.json when path to package.json (\`--package \`) is valid", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not try to find a package.json", @@ -1248,7 +1248,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided package.json when path to package.json unspecified", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return merged options incl. found package.json", @@ -1265,7 +1265,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided rc file when called with config = false (\`--no-config\`)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not attempt to find a config file", @@ -1294,7 +1294,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided rc file when called with unspecified config when an rc file would be found", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to load file at found path", @@ -1317,7 +1317,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided rc file when called with unspecified config when an rc file would not be found", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should look for a config", @@ -1340,7 +1340,7 @@ TestRunResult { }, TestGroupResult { "name": "options loadOptions() when parameter provided rc file when path to config (\`--config \`) is invalid", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to load file at path", @@ -1366,10 +1366,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "helpers list() when given a comma-delimited string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a flat array", @@ -1380,7 +1380,7 @@ TestRunResult { }, TestGroupResult { "name": "helpers list() when provided a flat array", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a flat array", @@ -1391,7 +1391,7 @@ TestRunResult { }, TestGroupResult { "name": "helpers list() when provided a nested array", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a flat array", @@ -1402,7 +1402,7 @@ TestRunResult { }, TestGroupResult { "name": "helpers validateLegacyPlugin() when a plugin throws an exception upon load", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail and report the original error", @@ -1412,8 +1412,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "helpers validateLegacyPlugin() when used with \\"reporter\\" key", - "tests": Array [ + "name": "helpers validateLegacyPlugin() when used with "reporter" key", + "tests": [ TestCaseResult { "error": undefined, "name": "should disallow an array of names", @@ -1429,8 +1429,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "helpers validateLegacyPlugin() when used with an \\"interfaces\\" key", - "tests": Array [ + "name": "helpers validateLegacyPlugin() when used with an "interfaces" key", + "tests": [ TestCaseResult { "error": undefined, "name": "should disallow an array of names", @@ -1447,7 +1447,7 @@ TestRunResult { }, TestGroupResult { "name": "helpers validateLegacyPlugin() when used with an unknown plugin type", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail", @@ -1461,10 +1461,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "command run builder array type", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include option extension", @@ -1523,7 +1523,7 @@ TestRunResult { }, TestGroupResult { "name": "command run builder boolean type", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include option allow-uncaught", @@ -1654,7 +1654,7 @@ TestRunResult { }, TestGroupResult { "name": "command run builder number type", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include option jobs", @@ -1671,7 +1671,7 @@ TestRunResult { }, TestGroupResult { "name": "command run builder string type", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include option config", @@ -1727,10 +1727,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Mocha instance method addFile()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add the given file to the files array", @@ -1747,7 +1747,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method lazyLoadFiles()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the \`Mocha\` instance", @@ -1758,7 +1758,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method lazyLoadFiles() when passed \`true\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should enable lazy loading", @@ -1769,7 +1769,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method lazyLoadFiles() when passed a non-\`true\` value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should enable eager loading", @@ -1780,7 +1780,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method loadFiles()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should execute the optional callback if given", @@ -1797,7 +1797,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Mocha instance", @@ -1808,7 +1808,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js when \`Mocha\` instance in serial mode when passed \`true\` value when \`Mocha\` instance is in \`INIT\` state", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should enable parallel mode", @@ -1819,7 +1819,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js when \`Mocha\` instance in serial mode when passed \`true\` value when \`Mocha\` instance is not in \`INIT\` state", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -1830,7 +1830,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js when \`Mocha\` instance in serial mode when passed non-\`true\` value when \`Mocha\` instance is in \`INIT\` state", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should enable serial mode", @@ -1841,7 +1841,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js when parallel mode is already disabled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not swap the Runner, nor change lazy loading setting", @@ -1852,7 +1852,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in Node.js when parallel mode is already enabled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not swap the Runner, nor change lazy loading setting", @@ -1862,8 +1862,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method reporter() when a reporter exists relative to the \\"mocha\\" module path", - "tests": Array [ + "name": "Mocha instance method reporter() when a reporter exists relative to the "mocha" module path", + "tests": [ TestCaseResult { "error": undefined, "name": "should load from module path", @@ -1873,11 +1873,11 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method reporter() when a reporter exists relative to the \\"mocha\\" module path when the reporter throws upon load", - "tests": Array [ + "name": "Mocha instance method reporter() when a reporter exists relative to the "mocha" module path when the reporter throws upon load", + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw \\"invalid reporter\\" exception", + "name": "should throw "invalid reporter" exception", "result": "success", "time": 2, }, @@ -1891,7 +1891,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method reporter() when a reporter exists relative to the cwd", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should load from current working directory", @@ -1902,10 +1902,10 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method reporter() when a reporter exists relative to the cwd when the reporter throws upon load", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw \\"invalid reporter\\" exception", + "name": "should throw "invalid reporter" exception", "result": "success", "time": 2, }, @@ -1919,7 +1919,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method unloadFiles()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -1948,7 +1948,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha static method unloadFile()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should unload a specific file from cache", @@ -1962,13 +1962,13 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should start in \\"IDLE\\" state", + "name": "should start in "IDLE" state", "result": "success", "time": 1, }, @@ -1976,7 +1976,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner event EVENT_RUN_END", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should change the state to COMPLETE", @@ -1987,7 +1987,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method isParallelMode()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true", @@ -1998,7 +1998,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method linkPartialObjects()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the runner", @@ -2009,7 +2009,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -2026,7 +2026,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when an event contains an error and has positive failures when subsequent files already started running", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cleanly terminate the thread pool", @@ -2037,7 +2037,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when an event contains an error and has positive failures when subsequent files have not yet been run", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cleanly terminate the thread pool", @@ -2054,7 +2054,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when a suite has a bail flag when no event contains an error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not force-terminate", @@ -2065,7 +2065,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when a worker fails", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should delegate to Runner#uncaught", @@ -2082,7 +2082,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when instructed to link objects", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create object references", @@ -2093,7 +2093,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when instructed to link objects when event data object is missing an ID", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should result in an uncaught exception", @@ -2104,7 +2104,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when an event contains an error and has positive failures when subsequent files already started running", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cleanly terminate the thread pool", @@ -2115,7 +2115,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when an event contains an error and has positive failures when subsequent files have not yet been run", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cleanly terminate the thread pool", @@ -2126,7 +2126,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method run() when suite should bail when no event contains an error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not force-terminate", @@ -2137,7 +2137,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance method workerReporter()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return its context", @@ -2148,7 +2148,7 @@ TestRunResult { }, TestGroupResult { "name": "parallel-buffered-runner ParallelBufferedRunner instance property _state", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should disallow an invalid state transition", @@ -2162,10 +2162,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "ParallelBuffered constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should listen for Runner events", @@ -2182,7 +2182,7 @@ TestRunResult { }, TestGroupResult { "name": "ParallelBuffered event on any other event listened for", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should populate its \`events\` array with SerializableEvents", @@ -2193,7 +2193,7 @@ TestRunResult { }, TestGroupResult { "name": "ParallelBuffered event on EVENT_RUN_END", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should remove all listeners", @@ -2204,7 +2204,7 @@ TestRunResult { }, TestGroupResult { "name": "ParallelBuffered instance method done", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should execute its callback with a SerializableWorkerResult", @@ -2224,10 +2224,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "serializer function deserialize when passed a non-object value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the value", @@ -2238,7 +2238,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function deserialize when passed a SerializedWorkerResult object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the result of \`SerializableWorkerResult.deserialize\` called on the value", @@ -2249,7 +2249,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function deserialize when passed an object value which is not a SerializedWorkerResult", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the value", @@ -2260,7 +2260,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function deserialize when passed nothing", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`undefined\`", @@ -2271,7 +2271,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function serialize when not passed anything", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`undefined\`", @@ -2282,7 +2282,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function serialize when passed a non-object value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the value", @@ -2293,7 +2293,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function serialize when passed an object value having a \`serialize\` method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the result of the \`serialize\` method", @@ -2304,7 +2304,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer function serialize when passed an object value w/o a \`serialize\` method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the value", @@ -2315,10 +2315,10 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent constructor when called with a non-object \`rawObject\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw \\"invalid arg type\\" error", + "name": "should throw "invalid arg type" error", "result": "success", "time": 1, }, @@ -2326,10 +2326,10 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent constructor when called without \`eventName\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw \\"invalid arg value\\" error", + "name": "should throw "invalid arg value" error", "result": "success", "time": 0, }, @@ -2337,7 +2337,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should freeze the instance", @@ -2354,7 +2354,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not retain not-own props", @@ -2377,7 +2377,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object containing a nested prop with an Error value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should serialize the Error", @@ -2388,7 +2388,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object containing a non-\`serialize\` method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should remove the method", @@ -2399,7 +2399,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object containing a top-level prop with an Error value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should serialize the Error", @@ -2410,7 +2410,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object containing an array", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should serialize the array", @@ -2421,7 +2421,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object containing an object with a \`serialize\` method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call the \`serialize\` method", @@ -2432,7 +2432,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent instance method serialize when passed an object with a \`serialize\` method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call the \`serialize\` method", @@ -2443,7 +2443,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method create", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should instantiate a SerializableEvent", @@ -2454,7 +2454,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a new object w/ null prototype", @@ -2465,10 +2465,10 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize when passed a falsy parameter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw \\"invalid arg type\\" error", + "name": "should throw "invalid arg type" error", "result": "success", "time": 0, }, @@ -2476,7 +2476,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize when passed value contains \`data\` prop", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should ignore __proto__", @@ -2487,7 +2487,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize when passed value contains \`data\` prop when \`data\` prop contains a nested serialized Error prop", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create an Error instance from the nested serialized Error prop", @@ -2498,7 +2498,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize when passed value contains an \`error\` prop", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should create an Error instance from the prop", @@ -2508,8 +2508,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "serializer SerializableEvent static method deserialize when passed value data contains a prop beginning with \\"$$\\"", - "tests": Array [ + "name": "serializer SerializableEvent static method deserialize when passed value data contains a prop beginning with "$$"", + "tests": [ TestCaseResult { "error": undefined, "name": "should create a new prop having a function value", @@ -2524,7 +2524,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should remove the prop with the \\"$$\\" prefix", + "name": "should remove the prop with the "$$" prefix", "result": "success", "time": 0, }, @@ -2532,7 +2532,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableEvent static method deserialize when the value data contains a prop with an array value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should deserialize each prop", @@ -2543,7 +2543,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add a readonly \`__type\` prop", @@ -2554,7 +2554,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult instance method serialize", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call \`SerializableEvent#serialize\` of each of its events", @@ -2571,7 +2571,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult static method create", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a new SerializableWorkerResult instance", @@ -2582,7 +2582,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult static method deserialize", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call SerializableEvent#deserialize on each item in its \`events\` prop", @@ -2599,7 +2599,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an instance", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`true\`", @@ -2610,7 +2610,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an object with an appropriate \`__type\` prop", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`true\`", @@ -2621,7 +2621,7 @@ TestRunResult { }, TestGroupResult { "name": "serializer SerializableWorkerResult static method isSerializedWorkerResult when passed an object without an appropriate \`__type\` prop", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`false\`", @@ -2635,10 +2635,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "stackTraceFilter() on browser", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not strip out other bower_components", @@ -2649,7 +2649,7 @@ TestRunResult { }, TestGroupResult { "name": "stackTraceFilter() on node on POSIX OS", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not ignore other bower_components and components", @@ -2678,7 +2678,7 @@ TestRunResult { }, TestGroupResult { "name": "stackTraceFilter() on node on Windows", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work on Windows", @@ -2692,19 +2692,19 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "utils function canonicalType()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should return \\"asyncfunction\\" if the parameter is an async function", + "name": "should return "asyncfunction" if the parameter is an async function", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should return \\"buffer\\" if the parameter is a Buffer", + "name": "should return "buffer" if the parameter is a Buffer", "result": "success", "time": 0, }, @@ -2712,7 +2712,7 @@ TestRunResult { }, TestGroupResult { "name": "utils function cwd()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the current working directory", @@ -2723,16 +2723,16 @@ TestRunResult { }, TestGroupResult { "name": "utils function type()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should return \\"error\\" if the parameter is an Error", + "name": "should return "error" if the parameter is an Error", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "should return \\"function\\" if the parameter is an async function", + "name": "should return "function" if the parameter is an async function", "result": "success", "time": 0, }, @@ -2743,10 +2743,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "worker when run as main process", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -2757,7 +2757,7 @@ TestRunResult { }, TestGroupResult { "name": "worker when run as worker process", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should register itself with workerpool", @@ -2767,8 +2767,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when called with empty \\"filepath\\" argument", - "tests": Array [ + "name": "worker when run as worker process function run() when called with empty "filepath" argument", + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2779,7 +2779,7 @@ TestRunResult { }, TestGroupResult { "name": "worker when run as worker process function run() when called without arguments", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2790,7 +2790,7 @@ TestRunResult { }, TestGroupResult { "name": "worker when run as worker process function run() when passed a non-string \`options\` value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2801,7 +2801,7 @@ TestRunResult { }, TestGroupResult { "name": "worker when run as worker process function run() when passed an invalid string \`options\` value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2811,8 +2811,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when the file at \\"filepath\\" argument is unloadable", - "tests": Array [ + "name": "worker when run as worker process function run() when the file at "filepath" argument is unloadable", + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2822,8 +2822,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when the file at \\"filepath\\" is loadable", - "tests": Array [ + "name": "worker when run as worker process function run() when the file at "filepath" is loadable", + "tests": [ TestCaseResult { "error": undefined, "name": "should call Mocha#run", @@ -2832,13 +2832,13 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should handle \\"--require\\"", + "name": "should handle "--require"", "result": "success", "time": 2, }, TestCaseResult { "error": undefined, - "name": "should handle \\"--ui\\"", + "name": "should handle "--ui"", "result": "success", "time": 3, }, @@ -2857,8 +2857,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when the file at \\"filepath\\" is loadable when run twice", - "tests": Array [ + "name": "worker when run as worker process function run() when the file at "filepath" is loadable when run twice", + "tests": [ TestCaseResult { "error": undefined, "name": "should initialize only once", @@ -2868,8 +2868,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when the file at \\"filepath\\" is loadable when serialization fails", - "tests": Array [ + "name": "worker when run as worker process function run() when the file at "filepath" is loadable when serialization fails", + "tests": [ TestCaseResult { "error": undefined, "name": "should reject", @@ -2879,8 +2879,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "worker when run as worker process function run() when the file at \\"filepath\\" is loadable when serialization succeeds", - "tests": Array [ + "name": "worker when run as worker process function run() when the file at "filepath" is loadable when serialization succeeds", + "tests": [ TestCaseResult { "error": undefined, "name": "should resolve with a SerializedWorkerResult", @@ -2894,10 +2894,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Context nested", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work", @@ -2908,7 +2908,7 @@ TestRunResult { }, TestGroupResult { "name": "Context Siblings sequestered sibling", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work", @@ -2919,7 +2919,7 @@ TestRunResult { }, TestGroupResult { "name": "Context Siblings sibling verifiction", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should allow test siblings to modify shared context", @@ -2942,7 +2942,7 @@ TestRunResult { }, TestGroupResult { "name": "methods retries", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the number of retries", @@ -2953,7 +2953,7 @@ TestRunResult { }, TestGroupResult { "name": "methods slow()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the slow", @@ -2964,7 +2964,7 @@ TestRunResult { }, TestGroupResult { "name": "methods timeout()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the timeout", @@ -2978,10 +2978,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "durations when fast", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not highlight", @@ -2992,7 +2992,7 @@ TestRunResult { }, TestGroupResult { "name": "durations when reasonable", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should highlight in yellow", @@ -3003,7 +3003,7 @@ TestRunResult { }, TestGroupResult { "name": "durations when slow", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should highlight in red", @@ -3017,10 +3017,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Errors createForbiddenExclusivityError() when Mocha instance is not running in a worker process", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should output a message regarding --forbid-only", @@ -3031,7 +3031,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors createForbiddenExclusivityError() when Mocha instance is running in a worker process", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should output a message regarding incompatibility", @@ -3042,7 +3042,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors createInvalidInterfaceError()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include expected code in thrown interface errors", @@ -3053,7 +3053,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors createInvalidReporterError()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include expected code in thrown reporter errors", @@ -3064,7 +3064,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors deprecate()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cache the message", @@ -3087,7 +3087,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors isMochaError() when provided a non-error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -3098,7 +3098,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors isMochaError() when provided an Error object having a known Mocha error code", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return true", @@ -3109,7 +3109,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors isMochaError() when provided an Error object with a non-Mocha error code", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -3120,7 +3120,7 @@ TestRunResult { }, TestGroupResult { "name": "Errors warn()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call process.emitWarning", @@ -3146,10 +3146,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "global leaks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should cause tests to fail", @@ -3164,7 +3164,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should pass when prefixed \\"mocha-\\"", + "name": "should pass when prefixed "mocha-"", "result": "success", "time": 0, }, @@ -3181,10 +3181,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Mocha .grep()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add a RegExp to the mocha.options object", @@ -3212,8 +3212,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha \\"fgrep\\" option", - "tests": Array [ + "name": "Mocha "fgrep" option", + "tests": [ TestCaseResult { "error": undefined, "name": "should escape and convert string to a RegExp", @@ -3223,8 +3223,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha \\"grep\\" option", - "tests": Array [ + "name": "Mocha "grep" option", + "tests": [ TestCaseResult { "error": undefined, "name": "should add a RegExp to the mocha.options object", @@ -3240,8 +3240,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha \\"invert\\" option", - "tests": Array [ + "name": "Mocha "invert" option", + "tests": [ TestCaseResult { "error": undefined, "name": "should add a Boolean to the mocha.options object", @@ -3255,10 +3255,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "async hooks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "one", @@ -3284,10 +3284,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "serial nested", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "bar", @@ -3304,7 +3304,7 @@ TestRunResult { }, TestGroupResult { "name": "serial nested hooks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "one", @@ -3324,10 +3324,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "serial hooks", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "one", @@ -3353,10 +3353,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "hook timeout", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work", @@ -3370,10 +3370,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Hook error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should get the hook._error when called without arguments", @@ -3390,7 +3390,7 @@ TestRunResult { }, TestGroupResult { "name": "Hook reset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call Runnable.reset", @@ -3410,10 +3410,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Mocha constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set _cleanReferencesAfterRun to true", @@ -3424,7 +3424,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`global\` option is an \`Array\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to set globals", @@ -3435,7 +3435,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true and \`jobs\` option <= 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not enable parallel mode", @@ -3446,7 +3446,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true and \`jobs\` option > 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should enable parallel mode", @@ -3457,7 +3457,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true when \`enableGlobalSetup\` option is present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should toggle global setup fixtures", @@ -3468,7 +3468,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true when \`enableGlobalTeardown\` option is present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should configure global teardown fixtures", @@ -3479,7 +3479,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true when \`globalSetup\` option is present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should configure global setup fixtures", @@ -3490,7 +3490,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`parallel\` option is true when \`globalTeardown\` option is present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should configure global teardown fixtures", @@ -3501,7 +3501,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`retries\` option is not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not attempt to set retries", @@ -3512,7 +3512,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`retries\` option is present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to set retries\`", @@ -3523,7 +3523,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`rootHooks\` option is truthy", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "shouid attempt to set root hooks", @@ -3534,7 +3534,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`timeout\` option is \`false\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to set timeout", @@ -3545,7 +3545,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha constructor when \`timeout\` option is \`undefined\`", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not attempt to set timeout", @@ -3556,7 +3556,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method _runGlobalFixtures()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should execute multiple fixtures in order", @@ -3567,7 +3567,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method allowUncaught()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3590,7 +3590,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method asyncOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3613,7 +3613,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method bail()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3624,10 +3624,10 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method bail() when provided a falsy argument", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should unset the \\"bail\\" flag on the root suite", + "name": "should unset the "bail" flag on the root suite", "result": "success", "time": 1, }, @@ -3635,10 +3635,10 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method bail() when provided no arguments", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should set the \\"bail\\" flag on the root suite", + "name": "should set the "bail" flag on the root suite", "result": "success", "time": 1, }, @@ -3646,7 +3646,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method checkLeaks()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the checkLeaks option to true", @@ -3657,7 +3657,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method cleanReferencesAfterRun()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3680,7 +3680,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method color()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3703,7 +3703,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method delay()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3720,7 +3720,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method diff()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the diff option to true", @@ -3731,7 +3731,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method diff() when provided \`false\` argument", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the diff option to false", @@ -3742,7 +3742,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method dispose()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should dispose previous test runner", @@ -3765,7 +3765,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method forbidOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3788,7 +3788,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method forbidPending()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3811,7 +3811,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method fullTrace()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3834,7 +3834,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method global()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be an empty array initially", @@ -3851,7 +3851,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method global() when argument is invalid", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not modify the whitelist when given empty array", @@ -3868,7 +3868,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method global() when argument is valid", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add contents of string array to the whitelist", @@ -3891,7 +3891,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method growl()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3902,7 +3902,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method growl() if capable of notifications", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the growl option to true", @@ -3913,7 +3913,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method growl() if not capable of notifications", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the growl option to false", @@ -3924,7 +3924,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method hasGlobalSetupFixtures() when no global setup fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`false\`", @@ -3935,7 +3935,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method hasGlobalSetupFixtures() when one or more global setup fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`true\`", @@ -3946,7 +3946,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method hasGlobalTeardownFixtures() when no global teardown fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`false\`", @@ -3957,7 +3957,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method hasGlobalTeardownFixtures() when one or more global teardown fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`true\`", @@ -3968,7 +3968,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method inlineDiffs()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -3991,7 +3991,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method invert()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -4008,7 +4008,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method noHighlighting()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -4025,7 +4025,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method parallelMode() when \`Mocha\` is running in a browser", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4036,7 +4036,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method reporter()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -4059,7 +4059,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method rootHooks()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be chainable", @@ -4069,8 +4069,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided a single \\"after all\\" hook", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided a single "after all" hook", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach it to the root suite", @@ -4080,8 +4080,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided a single \\"after each\\" hook", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided a single "after each" hook", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach it to the root suite", @@ -4091,8 +4091,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided a single \\"before all\\" hook", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided a single "before all" hook", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach it to the root suite", @@ -4102,8 +4102,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided a single \\"before each\\" hook", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided a single "before each" hook", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach it to the root suite", @@ -4113,8 +4113,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided multiple \\"after all\\" hooks", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided multiple "after all" hooks", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach each to the root suite", @@ -4124,8 +4124,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided multiple \\"after each\\" hooks", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided multiple "after each" hooks", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach each to the root suite", @@ -4135,8 +4135,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided multiple \\"before all\\" hooks", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided multiple "before all" hooks", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach each to the root suite", @@ -4146,8 +4146,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method rootHooks() when provided multiple \\"before each\\" hooks", - "tests": Array [ + "name": "Mocha instance method rootHooks() when provided multiple "before each" hooks", + "tests": [ TestCaseResult { "error": undefined, "name": "should attach each to the root suite", @@ -4158,7 +4158,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should execute the callback when complete", @@ -4181,7 +4181,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() Base reporter initialization", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should configure the Base reporter", @@ -4191,8 +4191,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method run() Base reporter initialization when \\"color\\" options is set", - "tests": Array [ + "name": "Mocha instance method run() Base reporter initialization when "color" options is set", + "tests": [ TestCaseResult { "error": undefined, "name": "should configure the Base reporter", @@ -4203,7 +4203,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() Runner initialization", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should instantiate a Runner", @@ -4213,8 +4213,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method run() Runner initialization when \\"global\\" option is present", - "tests": Array [ + "name": "Mocha instance method run() Runner initialization when "global" option is present", + "tests": [ TestCaseResult { "error": undefined, "name": "should configure global vars", @@ -4224,19 +4224,19 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method run() Runner initialization when \\"grep\\" option is present", - "tests": Array [ + "name": "Mocha instance method run() Runner initialization when "grep" option is present", + "tests": [ TestCaseResult { "error": undefined, - "name": "should configure \\"grep\\"", + "name": "should configure "grep"", "result": "success", "time": 1, }, ], }, TestGroupResult { - "name": "Mocha instance method run() when \\"growl\\" option is present", - "tests": Array [ + "name": "Mocha instance method run() when "growl" option is present", + "tests": [ TestCaseResult { "error": undefined, "name": "should initialize growl support", @@ -4246,11 +4246,11 @@ TestRunResult { ], }, TestGroupResult { - "name": "Mocha instance method run() when a reporter instance has a \\"done\\" method", - "tests": Array [ + "name": "Mocha instance method run() when a reporter instance has a "done" method", + "tests": [ TestCaseResult { "error": undefined, - "name": "should call the reporter \\"done\\" method", + "name": "should call the reporter "done" method", "result": "success", "time": 1, }, @@ -4258,7 +4258,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when a run has finished and is called again", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not call \`Runner#runAsync()\`", @@ -4275,7 +4275,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when a run is in progress", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not call \`Runner#runAsync\`", @@ -4292,7 +4292,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when files have been added to the Mocha instance when Mocha is set to eagerly load files", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should eagerly load files", @@ -4303,7 +4303,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when files have been added to the Mocha instance when Mocha is set to lazily load files", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not eagerly load files", @@ -4314,7 +4314,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global setup fixtures disabled when global setup fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global setup fixtures", @@ -4325,7 +4325,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global setup fixtures disabled when global setup fixtures not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global setup fixtures", @@ -4336,7 +4336,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global setup fixtures enabled when global setup fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should run global setup fixtures", @@ -4347,7 +4347,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global setup fixtures enabled when global setup fixtures not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global setup fixtures", @@ -4358,7 +4358,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global teardown fixtures disabled when global teardown fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global teardown fixtures", @@ -4369,7 +4369,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global teardown fixtures disabled when global teardown fixtures not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global teardown fixtures", @@ -4380,7 +4380,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should run global teardown fixtures", @@ -4391,7 +4391,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures are present when global setup fixtures are present and enabled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should use the same context as returned by \`runGlobalSetup\`", @@ -4402,7 +4402,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when global teardown fixtures enabled when global teardown fixtures not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not run global teardown fixtures", @@ -4413,7 +4413,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when Mocha configured for multiple runs and multiple runs are attempted", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call \`Runner#runAsync\` for each call", @@ -4442,7 +4442,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method run() when the \`Mocha\` instance is already disposed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not call \`Runner#runAsync\`", @@ -4459,7 +4459,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method runGlobalSetup() when a fixture is not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not attempt to run fixtures", @@ -4470,7 +4470,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method runGlobalSetup() when fixture(s) are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt run the fixtures", @@ -4481,7 +4481,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method runGlobalTeardown() when a fixture is not present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "not attempt to run the fixtures", @@ -4492,7 +4492,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method runGlobalTeardown() when fixture(s) are present", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to run the fixtures", @@ -4503,7 +4503,7 @@ TestRunResult { }, TestGroupResult { "name": "Mocha instance method unloadFile() when run in a browser", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4517,10 +4517,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "overspecified asynchronous resolution method", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail when multiple methods are used", @@ -4534,10 +4534,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "parseQuery()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should get queryString and return key-value object", @@ -4546,7 +4546,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should parse \\"+\\" as a space", + "name": "should parse "+" as a space", "result": "success", "time": 0, }, @@ -4557,10 +4557,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "plugin module class PluginLoader constructor when passed custom plugins", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should register the custom plugins", @@ -4571,7 +4571,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader constructor when passed ignored plugins", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should retain a list of ignored plugins", @@ -4582,7 +4582,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader constructor when passed no options", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should populate a registry of built-in plugins", @@ -4592,8 +4592,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "plugin module class PluginLoader instance method finalize() when a plugin has no \\"finalize\\" function", - "tests": Array [ + "name": "plugin module class PluginLoader instance method finalize() when a plugin has no "finalize" function", + "tests": [ TestCaseResult { "error": undefined, "name": "should return an array of raw implementations", @@ -4604,7 +4604,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method finalize() when a plugin has one or more implementations", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should omit unused plugins", @@ -4621,7 +4621,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method finalize() when no plugins have been loaded", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an empty map", @@ -4632,7 +4632,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when called with a falsy value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -4643,7 +4643,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when called with an object containing a recognized plugin", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call the associated validator, if present", @@ -4666,7 +4666,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when called with an object containing no recognized plugin", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -4677,7 +4677,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when passed a falsy or non-object value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not call a validator", @@ -4694,7 +4694,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call the associated validator", @@ -4711,7 +4711,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export when the value does not pass the associated validator", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4722,7 +4722,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when passed an object value when a key matches a known named export when the value passes the associated validator", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add the implementation to the internal mapping", @@ -4745,7 +4745,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method load() when passed an object value when no keys match any known named exports", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -4756,7 +4756,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when passed a definition w/o an exportName", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4767,7 +4767,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when passed a falsy parameter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4778,7 +4778,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when passed a non-object parameter", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4789,7 +4789,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when the plugin export name is already in use", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -4800,7 +4800,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when the plugin export name is ignored", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not register the plugin", @@ -4817,7 +4817,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader instance method register() when the plugin export name is not in use", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not throw", @@ -4828,7 +4828,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module class PluginLoader static method create()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a PluginLoader instance", @@ -4839,7 +4839,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global setup when an implementation is a function", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4850,7 +4850,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global setup when an implementation is a primitive", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4861,7 +4861,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global setup when an implementation is an array of functions", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4872,7 +4872,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global setup when an implementation is an array of primitives", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4883,7 +4883,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global teardown when an implementation is a function", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4894,7 +4894,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global teardown when an implementation is a primitive", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4905,7 +4905,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global teardown when an implementation is an array of functions", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4916,7 +4916,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module global fixtures plugin global teardown when an implementation is an array of primitives", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4927,7 +4927,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module root hooks plugin 🎣 when a loaded impl is finalized", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should flatten the implementations", @@ -4938,7 +4938,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module root hooks plugin 🎣 when impl is a function", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4949,7 +4949,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module root hooks plugin 🎣 when impl is a primitive", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4960,7 +4960,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module root hooks plugin 🎣 when impl is an array", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail validation", @@ -4971,7 +4971,7 @@ TestRunResult { }, TestGroupResult { "name": "plugin module root hooks plugin 🎣 when impl is an object of functions", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass validation", @@ -4985,10 +4985,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "using imported describe", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "using imported it", @@ -5002,10 +5002,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "root", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be a valid suite", @@ -5019,10 +5019,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runnable(title, fn) .run(fn) if async", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "this.skip() should halt synchronous execution", @@ -5039,7 +5039,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) if timed-out", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should ignore call to \`done\` and not execute callback again", @@ -5050,7 +5050,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when .pending", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not invoke the callback", @@ -5061,7 +5061,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should allow a timeout of 0", @@ -5078,7 +5078,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when an error is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5089,7 +5089,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when an exception is thrown", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5106,7 +5106,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when an exception is thrown and is allowed to remain uncaught", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when it is allowed", @@ -5117,7 +5117,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when done() is invoked with a non-Error object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5128,7 +5128,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when done() is invoked with a string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5139,10 +5139,10 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when the callback is invoked several times with an error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should emit a single \\"error\\" event", + "name": "should emit a single "error" event", "result": "success", "time": 1, }, @@ -5150,10 +5150,10 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async when the callback is invoked several times without an error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should emit a single \\"error\\" event", + "name": "should emit a single "error" event", "result": "success", "time": 1, }, @@ -5161,7 +5161,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when async without error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5172,7 +5172,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn is not a function", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw an error", @@ -5183,7 +5183,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a non-promise", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5194,7 +5194,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a promise when the promise is fulfilled with a value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5205,7 +5205,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a promise when the promise is fulfilled with no value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5216,7 +5216,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a promise when the promise is rejected", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5227,7 +5227,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a promise when the promise is rejected without a reason", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5238,7 +5238,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when fn returns a promise when the promise takes too long to settle", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw the timeout error", @@ -5249,7 +5249,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when sync when an exception is thrown", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback with error", @@ -5260,7 +5260,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when sync when an exception is thrown and is allowed to remain uncaught", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "throws an error when it is allowed", @@ -5271,7 +5271,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when sync without error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should invoke the callback", @@ -5282,7 +5282,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .run(fn) when timeouts are disabled", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not error with timeout", @@ -5293,7 +5293,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .title", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be present", @@ -5304,7 +5304,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) .titlePath()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the concatenation of the parent's title path and runnable's title", @@ -5315,7 +5315,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #globals", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should allow for whitelisting globals", @@ -5326,7 +5326,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #isFailed()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return \`false\` if test is pending", @@ -5349,7 +5349,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #reset", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should reset current run state", @@ -5360,7 +5360,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #resetTimeout()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not time out if timeouts disabled after reset", @@ -5371,7 +5371,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #retries(n)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the number of retries", @@ -5382,7 +5382,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #slow(ms)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not set the slow threshold if the parameter is not passed", @@ -5405,7 +5405,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #slow(ms) when passed a time-formatted string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should convert to ms", @@ -5416,7 +5416,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is equal to lower bound given numeric value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the timeout value to disabled", @@ -5427,7 +5427,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is equal to lower bound given string timestamp", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the timeout value to disabled", @@ -5438,7 +5438,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is equal to upper bound given numeric value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the disabled timeout value", @@ -5449,7 +5449,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is less than lower bound", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should clamp to lower bound given numeric", @@ -5466,7 +5466,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is out-of-bounds given numeric value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the disabled timeout value", @@ -5477,7 +5477,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is within \`setTimeout\` bounds given numeric value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the timeout value", @@ -5488,7 +5488,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) #timeout(ms) when value is within \`setTimeout\` bounds given string timestamp", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should set the timeout value", @@ -5499,7 +5499,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) interesting property id", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should have a permanent identifier", @@ -5516,7 +5516,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) static method toValueOrError", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an Error if parameter is falsy", @@ -5533,7 +5533,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) when arity == 0", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be .sync", @@ -5550,7 +5550,7 @@ TestRunResult { }, TestGroupResult { "name": "Runnable(title, fn) when arity >= 1", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be .async", @@ -5570,10 +5570,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Runner instance method _uncaught() when called with a non-Runner context", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -5584,7 +5584,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method abort()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Runner", @@ -5601,7 +5601,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method allowUncaught()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "async - should allow unhandled errors in hooks to propagate through", @@ -5630,7 +5630,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method checkGlobals(test)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should allow variables that match a wildcard", @@ -5639,19 +5639,19 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should emit \\"fail\\" when a global beginning with \\"d\\" is introduced", + "name": "should emit "fail" when a global beginning with "d" is introduced", "result": "success", "time": 0, }, TestCaseResult { "error": undefined, - "name": "should emit \\"fail\\" when a new global is introduced", + "name": "should emit "fail" when a new global is introduced", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "should emit \\"fail\\" when a single new disallowed global is introduced after a single extra global is allowed", + "name": "should emit "fail" when a single new disallowed global is introduced after a single extra global is allowed", "result": "success", "time": 0, }, @@ -5683,16 +5683,16 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method dispose()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should remove \\"error\\" listeners from a test", + "name": "should remove "error" listeners from a test", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "should remove \\"uncaughtException\\" listeners from the process", + "name": "should remove "uncaughtException" listeners from the process", "result": "success", "time": 0, }, @@ -5706,16 +5706,16 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method fail()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should emit \\"fail\\"", + "name": "should emit "fail"", "result": "success", "time": 1, }, TestCaseResult { "error": undefined, - "name": "should emit \\"fail\\"", + "name": "should emit "fail"", "result": "success", "time": 0, }, @@ -5763,7 +5763,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should not emit \\"end\\" if suite bail is not true", + "name": "should not emit "end" if suite bail is not true", "result": "success", "time": 1, }, @@ -5781,29 +5781,29 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should set \`Test#state\` to \\"failed\\"", + "name": "should set \`Test#state\` to "failed"", "result": "success", "time": 0, }, ], }, TestGroupResult { - "name": "Runner instance method fail() when Runner has stopped when test is not pending when error is not of the \\"multiple done\\" variety", - "tests": Array [ + "name": "Runner instance method fail() when Runner has stopped when test is not pending when error is not of the "multiple done" variety", + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw a \\"fatal\\" error", + "name": "should throw a "fatal" error", "result": "success", "time": 1, }, ], }, TestGroupResult { - "name": "Runner instance method fail() when Runner has stopped when test is not pending when error is the \\"multiple done\\" variety", - "tests": Array [ + "name": "Runner instance method fail() when Runner has stopped when test is not pending when error is the "multiple done" variety", + "tests": [ TestCaseResult { "error": undefined, - "name": "should throw the \\"multiple done\\" error", + "name": "should throw the "multiple done" error", "result": "success", "time": 1, }, @@ -5811,7 +5811,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method globalProps()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should include common non enumerable globals", @@ -5822,7 +5822,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method globals()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should default to the known globals", @@ -5839,7 +5839,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method grep()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should update the runner.total with number of matched tests", @@ -5856,7 +5856,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method grepTotal()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the total number of matched tests", @@ -5873,7 +5873,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method hook()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should augment hook title with current test title", @@ -5890,7 +5890,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method isParallelMode()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false", @@ -5901,7 +5901,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method linkPartialObjects()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Runner", @@ -5912,7 +5912,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method run()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should clean references after a run", @@ -5921,7 +5921,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should emit \\"retry\\" when a retryable test fails", + "name": "should emit "retry" when a retryable test fails", "result": "success", "time": 1, }, @@ -5947,7 +5947,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method run() stack traces ginormous", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not hang if overlong error message is multiple lines", @@ -5964,7 +5964,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method run() stack traces long", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should display the full stack-trace", @@ -5975,7 +5975,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method run() stack traces short", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should prettify the stack-trace", @@ -5986,7 +5986,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method runAsync()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should pass through options to Runner#run", @@ -6003,7 +6003,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method runTest()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return when no tests to run", @@ -6014,7 +6014,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when allow-uncaught is set to true", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should propagate error and throw", @@ -6025,7 +6025,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is a Pending", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should ignore argument and return", @@ -6036,10 +6036,10 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, - "name": "should add the \\"uncaught\\" property to the Error", + "name": "should add the "uncaught" property to the Error", "result": "success", "time": 1, }, @@ -6047,7 +6047,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should clear any pending timeouts", @@ -6058,7 +6058,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when current Runnable has already failed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not attempt to fail again", @@ -6069,7 +6069,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when current Runnable has been marked pending", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should attempt to fail", @@ -6080,7 +6080,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable has already passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should abort the runner without emitting end event", @@ -6097,7 +6097,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable is still running when the current Runnable is a Hook", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not notify run has ended", @@ -6120,7 +6120,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when a Runnable is running or has run when the current Runnable is still running when the current Runnable is a Test", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not notify run has ended", @@ -6143,7 +6143,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail with a transient Runnable and the error", @@ -6154,7 +6154,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is IDLE", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should emit start/end events for the benefit of reporters", @@ -6165,7 +6165,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is RUNNING", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not emit start/end events", @@ -6176,7 +6176,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is an Error when no Runnables are running when Runner is STOPPED", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not emit start/end events, since this presumably would have already happened", @@ -6193,7 +6193,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method uncaught() when provided an object argument when argument is not an Error", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should fail with a transient Runnable and a new Error coerced from the object", @@ -6204,7 +6204,7 @@ TestRunResult { }, TestGroupResult { "name": "Runner instance method workerReporter()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -6218,10 +6218,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Suite instance method addSuite()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds the suite to the suites collection", @@ -6256,7 +6256,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method addTest()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds the test to the tests collection", @@ -6279,7 +6279,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method afterAll() wraps the passed in function in a Hook", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds it to _afterAll", @@ -6302,7 +6302,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method afterEach() wraps the passed in function in a Hook", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds it to _afterEach", @@ -6325,7 +6325,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method bail() when argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Suite object", @@ -6336,7 +6336,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method bail() when no argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the bail value", @@ -6347,7 +6347,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method beforeAll() wraps the passed in function in a Hook", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds it to _beforeAll", @@ -6370,7 +6370,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method beforeEach() when the suite is pending", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not create a hook", @@ -6381,7 +6381,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method beforeEach() wraps the passed in function in a Hook", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "adds it to _beforeEach", @@ -6404,7 +6404,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method clone()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should clone the Suite, omitting children", @@ -6415,7 +6415,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method constructor", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not throw if the title is a string", @@ -6438,7 +6438,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method create()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "does not create a second root suite", @@ -6455,7 +6455,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method eachTest(fn) when there are no nested suites or tests", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return 0", @@ -6466,7 +6466,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method eachTest(fn) when there are several levels of nested suites", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the number", @@ -6477,7 +6477,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method eachTest(fn) when there are several tests in the suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the number", @@ -6488,7 +6488,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method filterOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should filter out all other tests and suites if a suite has \`only\`", @@ -6505,7 +6505,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method fullTitle() when there is a parent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the combination of parent's and suite's title", @@ -6516,7 +6516,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method fullTitle() when there is no parent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the suite title", @@ -6527,7 +6527,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method hasOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false if no suite or test is marked \`only\`", @@ -6556,7 +6556,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method markOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call appendOnlySuite on parent", @@ -6567,7 +6567,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method reset()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should forward reset to all hooks", @@ -6590,7 +6590,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method slow() when argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Suite object", @@ -6601,7 +6601,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method slow() when given a string", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should parse it", @@ -6612,7 +6612,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method slow() when no argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the slow value", @@ -6623,7 +6623,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method timeout()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should convert a string to milliseconds", @@ -6634,7 +6634,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method timeout() when argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the Suite object", @@ -6645,7 +6645,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method timeout() when no argument is passed", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the timeout value", @@ -6656,7 +6656,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method titlePath() when there is a parent the parent is not the root suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the concatenation of parent's and suite's title", @@ -6667,7 +6667,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method titlePath() when there is a parent the parent is the root suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the suite title", @@ -6678,7 +6678,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method titlePath() when there is no parent", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "returns the suite title", @@ -6689,7 +6689,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method total() when there are no nested suites or tests", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return 0", @@ -6700,7 +6700,7 @@ TestRunResult { }, TestGroupResult { "name": "Suite instance method total() when there are several tests in the suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return the number", @@ -6711,7 +6711,7 @@ TestRunResult { }, TestGroupResult { "name": "Test initialization", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not throw if the title is a string", @@ -6731,10 +6731,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "Test .clone()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add/keep the retriedTest value", @@ -6793,7 +6793,7 @@ TestRunResult { }, TestGroupResult { "name": "Test .isPending()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should be pending when its parent is pending", @@ -6816,7 +6816,7 @@ TestRunResult { }, TestGroupResult { "name": "Test .markOnly()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call appendOnlyTest on parent", @@ -6827,7 +6827,7 @@ TestRunResult { }, TestGroupResult { "name": "Test .reset()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should call Runnable.reset", @@ -6847,10 +6847,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "a test that throws non-extensible", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not pass if throwing async and test is async", @@ -6873,7 +6873,7 @@ TestRunResult { }, TestGroupResult { "name": "a test that throws null", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not pass if throwing async and test is async", @@ -6896,7 +6896,7 @@ TestRunResult { }, TestGroupResult { "name": "a test that throws undefined", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should not pass if throwing async and test is async", @@ -6922,10 +6922,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "timeouts", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should allow overriding per-test", @@ -6942,7 +6942,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work with timeout(0)", @@ -6953,7 +6953,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling suite-level", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work with timeout(0)", @@ -6964,7 +6964,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling suite-level nested suite", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work with timeout(0)", @@ -6975,7 +6975,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling using before", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work with timeout(0)", @@ -6986,7 +6986,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling using beforeEach", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should work with timeout(0)", @@ -6997,7 +6997,7 @@ TestRunResult { }, TestGroupResult { "name": "timeouts disabling using timeout(0)", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should suppress timeout(4)", @@ -7011,10 +7011,10 @@ TestRunResult { "totalTime": undefined, }, TestSuiteResult { - "groups": Array [ + "groups": [ TestGroupResult { "name": "lib/utils canonicalType()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should recognize various types", @@ -7025,7 +7025,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils canonicalType() when toString on null or undefined stringifies window", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should recognize null and undefined", @@ -7036,7 +7036,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils castArray() when provided a primitive value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an array containing the primitive value only", @@ -7046,8 +7046,8 @@ TestRunResult { ], }, TestGroupResult { - "name": "lib/utils castArray() when provided an \\"arguments\\" value", - "tests": Array [ + "name": "lib/utils castArray() when provided an "arguments" value", + "tests": [ TestCaseResult { "error": undefined, "name": "should return an array containing the arguments", @@ -7058,7 +7058,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils castArray() when provided an array value", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a copy of the array", @@ -7069,7 +7069,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils castArray() when provided an object", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an array containing the object only", @@ -7080,7 +7080,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils castArray() when provided no parameters", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an empty array", @@ -7091,7 +7091,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils castArray() when provided null", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return an array containing a null value only", @@ -7102,7 +7102,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils clean()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should format a multi line test indented with spaces", @@ -7209,7 +7209,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils createMap()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should add props from all object parameters to the object", @@ -7232,7 +7232,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils dQuote()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return its input as string wrapped in double quotes", @@ -7243,7 +7243,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils escape()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "replaces invalid xml characters", @@ -7260,7 +7260,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils isPromise()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return false if the object is null", @@ -7269,7 +7269,7 @@ TestRunResult { }, TestCaseResult { "error": undefined, - "name": "should return false if the value is an object w/o a \\"then\\" function", + "name": "should return false if the value is an object w/o a "then" function", "result": "success", "time": 0, }, @@ -7289,7 +7289,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils lookupFiles() when run in browser", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should throw", @@ -7300,7 +7300,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils lookupFiles() when run in Node.js", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should delegate to new location of lookupFiles()", @@ -7317,7 +7317,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils slug()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should convert the string to lowercase", @@ -7346,7 +7346,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils sQuote()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return its input as string wrapped in single quotes", @@ -7357,7 +7357,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils stringify()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "might get confusing", @@ -7506,7 +7506,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils stringify() #Number", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "floats and ints", @@ -7535,7 +7535,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils stringify() canonicalize example", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should represent the actual full result", @@ -7546,7 +7546,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils type()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should recognize various types", @@ -7557,7 +7557,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils type() when toString on null or undefined stringifies window", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should recognize null and undefined", @@ -7568,7 +7568,7 @@ TestRunResult { }, TestGroupResult { "name": "lib/utils uniqueID()", - "tests": Array [ + "tests": [ TestCaseResult { "error": undefined, "name": "should return a non-empty string", diff --git a/__tests__/__snapshots__/python-xunit.test.ts.snap b/__tests__/__snapshots__/python-xunit.test.ts.snap new file mode 100644 index 0000000..f325c84 --- /dev/null +++ b/__tests__/__snapshots__/python-xunit.test.ts.snap @@ -0,0 +1,192 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`python-xunit pytest report report from python test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/python-xunit-pytest.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "tests.test_lib", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "test_always_pass", + "result": "success", + "time": 2, + }, + TestCaseResult { + "error": undefined, + "name": "test_with_subtests", + "result": "success", + "time": 5, + }, + TestCaseResult { + "error": undefined, + "name": "test_parameterized[param1]", + "result": "success", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_parameterized[param2]", + "result": "success", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_always_skip", + "result": "skipped", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "def test_always_fail(): + > assert False + E assert False + + tests/test_lib.py:25: AssertionError + ", + "line": undefined, + "message": "assert False", + "path": undefined, + }, + "name": "test_always_fail", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_expected_failure", + "result": "skipped", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "def test_error(): + > raise Exception("error") + E Exception: error + + tests/test_lib.py:32: Exception + ", + "line": undefined, + "message": "Exception: error", + "path": undefined, + }, + "name": "test_error", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_with_record_property", + "result": "success", + "time": 0, + }, + ], + }, + TestGroupResult { + "name": "custom_classname", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "test_with_record_xml_attribute", + "result": "success", + "time": 0, + }, + ], + }, + ], + "name": "pytest", + "totalTime": 19, + }, + ], + "totalTime": undefined, +} +`; + +exports[`python-xunit unittest report report from python test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/python-xunit-unittest.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "TestAcme", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "test_always_pass", + "result": "success", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_parameterized_0_param1", + "result": "success", + "time": 1, + }, + TestCaseResult { + "error": undefined, + "name": "test_parameterized_1_param2", + "result": "success", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_with_subtests", + "result": "success", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "Traceback (most recent call last): + File "/Users/foo/Projects/python-test/tests/test_lib.py", line 24, in test_always_fail + self.fail("failed") +AssertionError: failed +", + "line": undefined, + "message": "AssertionError: failed", + "path": undefined, + }, + "name": "test_always_fail", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": { + "details": "Traceback (most recent call last): + File "/Users/foo/Projects/python-test/tests/test_lib.py", line 31, in test_error + raise Exception("error") +Exception: error +", + "line": undefined, + "message": "Exception: error", + "path": undefined, + }, + "name": "test_error", + "result": "failed", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_always_skip", + "result": "skipped", + "time": 0, + }, + TestCaseResult { + "error": undefined, + "name": "test_expected_failure", + "result": "skipped", + "time": 0, + }, + ], + }, + ], + "name": "TestAcme-20251114214921", + "totalTime": 1, + }, + ], + "totalTime": 1, +} +`; diff --git a/__tests__/__snapshots__/rspec-json.test.ts.snap b/__tests__/__snapshots__/rspec-json.test.ts.snap new file mode 100644 index 0000000..51c1943 --- /dev/null +++ b/__tests__/__snapshots__/rspec-json.test.ts.snap @@ -0,0 +1,49 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`rspec-json tests report from ./reports/rspec-json test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/rspec-json.json", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "CheckEnvVars#call when all env vars are defined behaves like success load", + "tests": [ + TestCaseResult { + "error": { + "details": "/usr/local/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:1603:in \`initialize' +./config/check_env_vars.rb:11:in \`call' +./spec/config/check_env_vars_spec.rb:7:in \`block (3 levels) in ' +./spec/config/check_env_vars_spec.rb:19:in \`block (4 levels) in '", + "line": 11, + "message": "(#ActiveSupport::BroadcastLogger:0x00007f1007fedf58).debug("All config env vars exist") + expected: 0 times with arguments: ("All config env vars exist") + received: 1 time with arguments: ("All config env vars exist")", + "path": "./config/check_env_vars.rb", + }, + "name": "CheckEnvVars#call when all env vars are defined behaves like success load fails in assertion", + "result": "failed", + "time": 0.004411051, + }, + TestCaseResult { + "error": undefined, + "name": "CheckEnvVars#call when all env vars are defined behaves like success load logs success message", + "result": "success", + "time": 0.079159625, + }, + TestCaseResult { + "error": undefined, + "name": "CheckEnvVars#call when all env vars are defined behaves like success load skips the test", + "result": "skipped", + "time": 0.000023007, + }, + ], + }, + ], + "name": "./spec/config/check_env_vars_spec.rb", + "totalTime": undefined, + }, + ], + "totalTime": 0.19118387, +} +`; diff --git a/__tests__/__snapshots__/swift-xunit.test.ts.snap b/__tests__/__snapshots__/swift-xunit.test.ts.snap new file mode 100644 index 0000000..bddc6ea --- /dev/null +++ b/__tests__/__snapshots__/swift-xunit.test.ts.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`swift-xunit tests report from swift test results matches snapshot 1`] = ` +TestRunResult { + "path": "fixtures/swift-xunit.xml", + "suites": [ + TestSuiteResult { + "groups": [ + TestGroupResult { + "name": "AcmeLibTests.AcmeLibTests", + "tests": [ + TestCaseResult { + "error": undefined, + "name": "test_always_pass", + "result": "success", + "time": 36.386333, + }, + TestCaseResult { + "error": undefined, + "name": "test_always_skip", + "result": "success", + "time": 92.039167, + }, + TestCaseResult { + "error": { + "details": undefined, + "line": undefined, + "message": "failed", + "path": undefined, + }, + "name": "test_always_fail", + "result": "failed", + "time": 92.05175, + }, + ], + }, + ], + "name": "TestResults", + "totalTime": 220.47725000000003, + }, + ], + "totalTime": undefined, +} +`; diff --git a/__tests__/dart-json.test.ts b/__tests__/dart-json.test.ts index a2b959c..12b664b 100644 --- a/__tests__/dart-json.test.ts +++ b/__tests__/dart-json.test.ts @@ -3,7 +3,7 @@ import * as path from 'path' import {DartJsonParser} from '../src/parsers/dart-json/dart-json-parser' import {ParseOptions} from '../src/test-parser' -import {getReport} from '../src/report/get-report' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' import {normalizeFilePath} from '../src/utils/path-utils' describe('dart-json tests', () => { @@ -66,4 +66,66 @@ describe('dart-json tests', () => { fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dart-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DartJsonParser(opts, 'dart') + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'dart-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DartJsonParser(opts, 'dart') + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dart-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DartJsonParser(opts, 'dart') + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) }) diff --git a/__tests__/dotnet-nunit.test.ts b/__tests__/dotnet-nunit.test.ts new file mode 100644 index 0000000..6903c5a --- /dev/null +++ b/__tests__/dotnet-nunit.test.ts @@ -0,0 +1,91 @@ +import * as fs from 'fs' +import * as path from 'path' + +import {DotnetNunitParser} from '../src/parsers/dotnet-nunit/dotnet-nunit-parser' +import {ParseOptions} from '../src/test-parser' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' +import {normalizeFilePath} from '../src/utils/path-utils' + +describe('dotnet-nunit tests', () => { + it('report from ./reports/dotnet test results matches snapshot', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-nunit.xml') + const outputPath = path.join(__dirname, '__outputs__', 'dotnet-nunit.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: ['DotnetTests.Unit/Calculator.cs', 'DotnetTests.NUnitV3Tests/CalculatorTests.cs'] + } + + const parser = new DotnetNunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-nunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetNunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-nunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetNunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-nunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetNunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) +}) diff --git a/__tests__/dotnet-trx.test.ts b/__tests__/dotnet-trx.test.ts index d4d5dac..a7aead6 100644 --- a/__tests__/dotnet-trx.test.ts +++ b/__tests__/dotnet-trx.test.ts @@ -3,7 +3,7 @@ import * as path from 'path' import {DotnetTrxParser} from '../src/parsers/dotnet-trx/dotnet-trx-parser' import {ParseOptions} from '../src/test-parser' -import {getReport} from '../src/report/get-report' +import {DEFAULT_OPTIONS, getReport, ReportOptions} from '../src/report/get-report' import {normalizeFilePath} from '../src/utils/path-utils' describe('dotnet-trx tests', () => { @@ -23,9 +23,50 @@ describe('dotnet-trx tests', () => { expect(result.result).toBe('success') }) - it('matches report snapshot', async () => { + it('produces empty test run result when TestDefinitions is empty', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'empty', 'dotnet-trx-empty-test-definitions.trx') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetTrxParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result.tests).toBe(0) + expect(result.result).toBe('success') + }) + + it.each([['dotnet-trx'], ['dotnet-xunitv3']])('matches %s report snapshot', async reportName => { + const fixturePath = path.join(__dirname, 'fixtures', `${reportName}.trx`) + const outputPath = path.join(__dirname, '__outputs__', `${reportName}.md`) + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [ + 'DotnetTests.Unit/Calculator.cs', + 'DotnetTests.XUnitTests/CalculatorTests.cs', + 'DotnetTests.XUnitV3Tests/FixtureTests.cs' + ] + //workDir: 'C:/Users/Michal/Workspace/dorny/test-check/reports/dotnet/' + } + + const parser = new DotnetTrxParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('matches report snapshot (only failed tests)', async () => { const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx') - const outputPath = path.join(__dirname, '__outputs__', 'dotnet-trx.md') + const outputPath = path.join(__dirname, '__outputs__', 'dotnet-trx-only-failed.md') const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) @@ -39,7 +80,12 @@ describe('dotnet-trx tests', () => { const result = await parser.parse(filePath, fileContent) expect(result).toMatchSnapshot() - const report = getReport([result]) + const reportOptions: ReportOptions = { + ...DEFAULT_OPTIONS, + listSuites: 'all', + listTests: 'failed' + } + const report = getReport([result], reportOptions) fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) @@ -83,4 +129,66 @@ describe('dotnet-trx tests', () => { fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetTrxParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetTrxParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new DotnetTrxParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) }) diff --git a/__tests__/fixtures/dart-json.json b/__tests__/fixtures/dart-json.json index 91b09db..79c3895 100644 --- a/__tests__/fixtures/dart-json.json +++ b/__tests__/fixtures/dart-json.json @@ -4,6 +4,7 @@ {"suite":{"id":2,"platform":"vm","path":"test\\second_test.dart"},"type":"suite","time":11} {"test":{"id":3,"name":"loading test\\second_test.dart","suiteID":2,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":11} {"count":2,"type":"allSuites","time":11} +{"testID":1,"messageType":"print","message":"Hello from the test","type":"print","time":3828} {"testID":3,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":3649} {"group":{"id":4,"suiteID":2,"parentID":null,"name":null,"metadata":{"skip":false,"skipReason":null},"testCount":2,"line":null,"column":null,"url":null},"type":"group","time":3654} {"test":{"id":5,"name":"Timeout test","suiteID":2,"groupIDs":[4],"metadata":{"skip":false,"skipReason":null},"line":5,"column":3,"url":"file:///C:/Users/Michal/Workspace/dorny/test-check/reports/dart/test/second_test.dart"},"type":"testStart","time":3655} diff --git a/__tests__/fixtures/dotnet-nunit.xml b/__tests__/fixtures/dotnet-nunit.xml new file mode 100644 index 0000000..e08a9f3 --- /dev/null +++ b/__tests__/fixtures/dotnet-nunit.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/__tests__/fixtures/dotnet-xunitv3.trx b/__tests__/fixtures/dotnet-xunitv3.trx new file mode 100644 index 0000000..6bd9c25 --- /dev/null +++ b/__tests__/fixtures/dotnet-xunitv3.trx @@ -0,0 +1,60 @@ + + + + + + + + + + + Assert.Null() Failure: Value is not null +Expected: null +Actual: Fixture { } + at DotnetTests.XUnitV3Tests.FixtureTests.Failing_Test() in /_/reports/dotnet/DotnetTests.XUnitV3Tests/FixtureTests.cs:line 25 + at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) + at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Exit code indicates failure: '2'. Please refer to https://aka.ms/testingplatform/exitcodes for more information. + + + + \ No newline at end of file diff --git a/__tests__/fixtures/empty/dart-json.json b/__tests__/fixtures/empty/dart-json.json index 4f3a23e..e47cf11 100644 --- a/__tests__/fixtures/empty/dart-json.json +++ b/__tests__/fixtures/empty/dart-json.json @@ -1,9 +1,15 @@ -{"protocolVersion":"0.1.1","runnerVersion":"1.15.4","pid":21320,"type":"start","time":0} -{"suite":{"id":0,"platform":"vm","path":"test\\main_test.dart"},"type":"suite","time":0} -{"test":{"id":1,"name":"loading test\\main_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":1} -{"suite":{"id":2,"platform":"vm","path":"test\\second_test.dart"},"type":"suite","time":11} -{"test":{"id":3,"name":"loading test\\second_test.dart","suiteID":2,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":11} -{"count":2,"type":"allSuites","time":11} -{"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":4018} -{"testID":3,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":4025} -{"success":true,"type":"done","time":4029} +{"protocolVersion":"0.1.1","runnerVersion":"1.25.3","pid":7103,"type":"start","time":0} +{"suite":{"id":0,"platform":"vm","path":"test/second_test.dart"},"type":"suite","time":0} +{"test":{"id":1,"name":"loading test/second_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":0} +{"suite":{"id":2,"platform":"vm","path":"test/main_test.dart"},"type":"suite","time":4} +{"test":{"id":3,"name":"loading test/main_test.dart","suiteID":2,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":4} +{"count":2,"time":5,"type":"allSuites"} +{"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":294} +{"testID":3,"messageType":"print","message":"Hello from the test","type":"print","time":297} +{"testID":3,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":321} +{"group":{"id":4,"suiteID":2,"parentID":null,"name":"","metadata":{"skip":false,"skipReason":null},"testCount":0,"line":null,"column":null,"url":null},"type":"group","time":322} +{"test":{"id":5,"name":"(setUpAll)","suiteID":2,"groupIDs":[4],"metadata":{"skip":false,"skipReason":null},"line":6,"column":3,"url":"file:///Users/domu/Downloads/test-reporter/reports/dart/test/main_test.dart"},"type":"testStart","time":322} +{"testID":5,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":330} +{"test":{"id":6,"name":"(tearDownAll)","suiteID":2,"groupIDs":[4],"metadata":{"skip":false,"skipReason":null},"line":7,"column":3,"url":"file:///Users/domu/Downloads/test-reporter/reports/dart/test/main_test.dart"},"type":"testStart","time":330} +{"testID":6,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":331} +{"success":true,"type":"done","time":333} diff --git a/__tests__/fixtures/empty/dotnet-trx-empty-test-definitions.trx b/__tests__/fixtures/empty/dotnet-trx-empty-test-definitions.trx new file mode 100644 index 0000000..7066144 --- /dev/null +++ b/__tests__/fixtures/empty/dotnet-trx-empty-test-definitions.trx @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + No test is available in (...). Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again. + + + + diff --git a/__tests__/fixtures/empty/jest-junit-empty-testsuite.xml b/__tests__/fixtures/empty/jest-junit-empty-testsuite.xml new file mode 100644 index 0000000..ad54653 --- /dev/null +++ b/__tests__/fixtures/empty/jest-junit-empty-testsuite.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/__tests__/fixtures/empty/rspec-json.json b/__tests__/fixtures/empty/rspec-json.json new file mode 100644 index 0000000..3629097 --- /dev/null +++ b/__tests__/fixtures/empty/rspec-json.json @@ -0,0 +1,17 @@ +{ + "version": "3.13.0", + "messages": [ + "No examples found." + ], + "examples": [ + + ], + "summary": { + "duration": 0.002514266, + "example_count": 0, + "failure_count": 0, + "pending_count": 0, + "errors_outside_of_examples_count": 0 + }, + "summary_line": "0 examples, 0 failures" +} diff --git a/__tests__/fixtures/external/java/empty_failures.xml b/__tests__/fixtures/external/java/empty_failures.xml new file mode 100644 index 0000000..c76ed0e --- /dev/null +++ b/__tests__/fixtures/external/java/empty_failures.xml @@ -0,0 +1,2 @@ + + diff --git a/__tests__/fixtures/external/jest/jest-react-component-test-results.xml b/__tests__/fixtures/external/jest/jest-react-component-test-results.xml new file mode 100644 index 0000000..cdaa87f --- /dev/null +++ b/__tests__/fixtures/external/jest/jest-react-component-test-results.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/__tests__/fixtures/external/nunit-sample.xml b/__tests__/fixtures/external/nunit-sample.xml new file mode 100644 index 0000000..b261560 --- /dev/null +++ b/__tests__/fixtures/external/nunit-sample.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/__tests__/fixtures/golang-json.json b/__tests__/fixtures/golang-json.json new file mode 100644 index 0000000..421a707 --- /dev/null +++ b/__tests__/fixtures/golang-json.json @@ -0,0 +1,59 @@ +{"Time":"2025-04-22T08:59:55.364618802-05:00","Action":"start","Package":"_/home/james_t/git/test-reporter/reports/go"} +{"Time":"2025-04-22T08:59:55.371779289-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPassing"} +{"Time":"2025-04-22T08:59:55.371805677-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPassing","Output":"=== RUN TestPassing\n"} +{"Time":"2025-04-22T08:59:55.428201983-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPassing","Output":" calculator_test.go:11: pass!\n"} +{"Time":"2025-04-22T08:59:55.428265529-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPassing","Output":"--- PASS: TestPassing (0.06s)\n"} +{"Time":"2025-04-22T08:59:55.428285649-05:00","Action":"pass","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPassing","Elapsed":0.06} +{"Time":"2025-04-22T08:59:55.428299886-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestFailing"} +{"Time":"2025-04-22T08:59:55.428309029-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestFailing","Output":"=== RUN TestFailing\n"} +{"Time":"2025-04-22T08:59:56.317425091-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestFailing","Output":" calculator_test.go:19: expected 1+1 = 3, got 2\n"} +{"Time":"2025-04-22T08:59:56.31748077-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestFailing","Output":"--- FAIL: TestFailing (0.89s)\n"} +{"Time":"2025-04-22T08:59:56.317493452-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestFailing","Elapsed":0.89} +{"Time":"2025-04-22T08:59:56.317506107-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideFunction"} +{"Time":"2025-04-22T08:59:56.317514487-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideFunction","Output":"=== RUN TestPanicInsideFunction\n"} +{"Time":"2025-04-22T08:59:56.317530448-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideFunction","Output":" calculator_test.go:76: caught panic: runtime error: integer divide by zero\n"} +{"Time":"2025-04-22T08:59:56.317541866-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideFunction","Output":"--- FAIL: TestPanicInsideFunction (0.00s)\n"} +{"Time":"2025-04-22T08:59:56.317552981-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideFunction","Elapsed":0} +{"Time":"2025-04-22T08:59:56.317561057-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideTest"} +{"Time":"2025-04-22T08:59:56.317568742-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideTest","Output":"=== RUN TestPanicInsideTest\n"} +{"Time":"2025-04-22T08:59:56.317584113-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideTest","Output":" calculator_test.go:76: caught panic: bad stuff\n"} +{"Time":"2025-04-22T08:59:56.317598524-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideTest","Output":"--- FAIL: TestPanicInsideTest (0.00s)\n"} +{"Time":"2025-04-22T08:59:56.317608268-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestPanicInsideTest","Elapsed":0} +{"Time":"2025-04-22T08:59:56.317615472-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestSkipped"} +{"Time":"2025-04-22T08:59:56.317623959-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestSkipped","Output":"=== RUN TestSkipped\n"} +{"Time":"2025-04-22T08:59:57.256475698-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestSkipped","Output":" calculator_test.go:45: skipping test\n"} +{"Time":"2025-04-22T08:59:57.256536372-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestSkipped","Output":"--- SKIP: TestSkipped (0.94s)\n"} +{"Time":"2025-04-22T08:59:57.256549142-05:00","Action":"skip","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestSkipped","Elapsed":0.94} +{"Time":"2025-04-22T08:59:57.256562053-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases"} +{"Time":"2025-04-22T08:59:57.256569388-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases","Output":"=== RUN TestCases\n"} +{"Time":"2025-04-22T08:59:57.256580104-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_+_2_=_3"} +{"Time":"2025-04-22T08:59:57.256587408-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_+_2_=_3","Output":"=== RUN TestCases/1_+_2_=_3\n"} +{"Time":"2025-04-22T08:59:57.653005399-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/4_+_7_=_11"} +{"Time":"2025-04-22T08:59:57.653036336-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/4_+_7_=_11","Output":"=== RUN TestCases/4_+_7_=_11\n"} +{"Time":"2025-04-22T08:59:58.112825221-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/2_+_3_=_4"} +{"Time":"2025-04-22T08:59:58.112858016-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/2_+_3_=_4","Output":"=== RUN TestCases/2_+_3_=_4\n"} +{"Time":"2025-04-22T08:59:58.201204209-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/2_+_3_=_4","Output":" calculator_test.go:67: expected 2 + 3 = 4, got 5\n"} +{"Time":"2025-04-22T08:59:58.201245827-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_/_2_=_1"} +{"Time":"2025-04-22T08:59:58.201255566-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_/_2_=_1","Output":"=== RUN TestCases/1_/_2_=_1\n"} +{"Time":"2025-04-22T08:59:59.119852965-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_/_2_=_1","Output":" calculator_test.go:67: expected 1 / 2 = 1, got 0\n"} +{"Time":"2025-04-22T08:59:59.119877603-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/9_/_3_=_3"} +{"Time":"2025-04-22T08:59:59.119879955-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/9_/_3_=_3","Output":"=== RUN TestCases/9_/_3_=_3\n"} +{"Time":"2025-04-22T08:59:59.460576385-05:00","Action":"run","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/14_/_7_=_2"} +{"Time":"2025-04-22T08:59:59.460607599-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/14_/_7_=_2","Output":"=== RUN TestCases/14_/_7_=_2\n"} +{"Time":"2025-04-22T08:59:59.504952672-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases","Output":"--- FAIL: TestCases (2.25s)\n"} +{"Time":"2025-04-22T08:59:59.504995938-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_+_2_=_3","Output":" --- PASS: TestCases/1_+_2_=_3 (0.40s)\n"} +{"Time":"2025-04-22T08:59:59.505006062-05:00","Action":"pass","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_+_2_=_3","Elapsed":0.4} +{"Time":"2025-04-22T08:59:59.505017551-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/4_+_7_=_11","Output":" --- PASS: TestCases/4_+_7_=_11 (0.46s)\n"} +{"Time":"2025-04-22T08:59:59.505026099-05:00","Action":"pass","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/4_+_7_=_11","Elapsed":0.46} +{"Time":"2025-04-22T08:59:59.505033963-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/2_+_3_=_4","Output":" --- FAIL: TestCases/2_+_3_=_4 (0.09s)\n"} +{"Time":"2025-04-22T08:59:59.505042238-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/2_+_3_=_4","Elapsed":0.09} +{"Time":"2025-04-22T08:59:59.505050917-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_/_2_=_1","Output":" --- FAIL: TestCases/1_/_2_=_1 (0.92s)\n"} +{"Time":"2025-04-22T08:59:59.505059901-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/1_/_2_=_1","Elapsed":0.92} +{"Time":"2025-04-22T08:59:59.505068125-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/9_/_3_=_3","Output":" --- PASS: TestCases/9_/_3_=_3 (0.34s)\n"} +{"Time":"2025-04-22T08:59:59.505076976-05:00","Action":"pass","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/9_/_3_=_3","Elapsed":0.34} +{"Time":"2025-04-22T08:59:59.5050845-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/14_/_7_=_2","Output":" --- PASS: TestCases/14_/_7_=_2 (0.04s)\n"} +{"Time":"2025-04-22T08:59:59.505091554-05:00","Action":"pass","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases/14_/_7_=_2","Elapsed":0.04} +{"Time":"2025-04-22T08:59:59.505098998-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Test":"TestCases","Elapsed":2.25} +{"Time":"2025-04-22T08:59:59.505107502-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Output":"FAIL\n"} +{"Time":"2025-04-22T08:59:59.505552861-05:00","Action":"output","Package":"_/home/james_t/git/test-reporter/reports/go","Output":"FAIL\t_/home/james_t/git/test-reporter/reports/go\t4.141s\n"} +{"Time":"2025-04-22T08:59:59.505584529-05:00","Action":"fail","Package":"_/home/james_t/git/test-reporter/reports/go","Elapsed":4.141} diff --git a/__tests__/fixtures/jest-junit-eslint.xml b/__tests__/fixtures/jest-junit-eslint.xml new file mode 100644 index 0000000..ceac3c6 --- /dev/null +++ b/__tests__/fixtures/jest-junit-eslint.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/__tests__/fixtures/junit-with-message.xml b/__tests__/fixtures/junit-with-message.xml new file mode 100644 index 0000000..2e3d584 --- /dev/null +++ b/__tests__/fixtures/junit-with-message.xml @@ -0,0 +1,10 @@ + + + + + ]]> + + + diff --git a/__tests__/fixtures/python-xunit-pytest.xml b/__tests__/fixtures/python-xunit-pytest.xml new file mode 100644 index 0000000..fcb044a --- /dev/null +++ b/__tests__/fixtures/python-xunit-pytest.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + /Users/mike/Projects/python-test/tests/test_lib.py:20: skipped + + + + def test_always_fail(): + > assert False + E assert False + + tests/test_lib.py:25: AssertionError + + + + + + + def test_error(): + > raise Exception("error") + E Exception: error + + tests/test_lib.py:32: Exception + + + + + + + + + + diff --git a/__tests__/fixtures/python-xunit-unittest.xml b/__tests__/fixtures/python-xunit-unittest.xml new file mode 100644 index 0000000..ecc67d4 --- /dev/null +++ b/__tests__/fixtures/python-xunit-unittest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + diff --git a/__tests__/fixtures/rspec-json.json b/__tests__/fixtures/rspec-json.json new file mode 100644 index 0000000..34d4e49 --- /dev/null +++ b/__tests__/fixtures/rspec-json.json @@ -0,0 +1,53 @@ +{ + "version": "3.13.0", + "examples": [ + { + "id": "./spec/config/check_env_vars_spec.rb[1:1:1:1:1]", + "description": "logs success message", + "full_description": "CheckEnvVars#call when all env vars are defined behaves like success load logs success message", + "status": "passed", + "file_path": "./spec/config/check_env_vars_spec.rb", + "line_number": 12, + "run_time": 0.079159625, + "pending_message": null + }, + { + "id": "./spec/config/check_env_vars_spec.rb[1:1:1:1:2]", + "description": "fails in assertion", + "full_description": "CheckEnvVars#call when all env vars are defined behaves like success load fails in assertion", + "status": "failed", + "file_path": "./spec/config/check_env_vars_spec.rb", + "line_number": 17, + "run_time": 0.004411051, + "pending_message": null, + "exception": { + "class": "RSpec::Mocks::MockExpectationError", + "message": "(#ActiveSupport::BroadcastLogger:0x00007f1007fedf58).debug(\"All config env vars exist\")\n expected: 0 times with arguments: (\"All config env vars exist\")\n received: 1 time with arguments: (\"All config env vars exist\")", + "backtrace": [ + "/usr/local/bundle/ruby/3.3.0/gems/net-http-0.4.1/lib/net/http.rb:1603:in `initialize'", + "./config/check_env_vars.rb:11:in `call'", + "./spec/config/check_env_vars_spec.rb:7:in `block (3 levels) in \u003ctop (required)\u003e'", + "./spec/config/check_env_vars_spec.rb:19:in `block (4 levels) in \u003ctop (required)\u003e'" + ] + } + }, + { + "id": "./spec/config/check_env_vars_spec.rb[1:1:1:1:4]", + "description": "skips the test", + "full_description": "CheckEnvVars#call when all env vars are defined behaves like success load skips the test", + "status": "pending", + "file_path": "./spec/config/check_env_vars_spec.rb", + "line_number": 27, + "run_time": 2.3007e-05, + "pending_message": "Temporarily skipped with xit" + } + ], + "summary": { + "duration": 0.19118387, + "example_count": 3, + "failure_count": 1, + "pending_count": 1, + "errors_outside_of_examples_count": 0 + }, + "summary_line": "3 examples, 1 failures, 1 pending" +} diff --git a/__tests__/fixtures/swift-xunit.xml b/__tests__/fixtures/swift-xunit.xml new file mode 100644 index 0000000..1046225 --- /dev/null +++ b/__tests__/fixtures/swift-xunit.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/__tests__/golang-json.test.ts b/__tests__/golang-json.test.ts new file mode 100644 index 0000000..0bfdd86 --- /dev/null +++ b/__tests__/golang-json.test.ts @@ -0,0 +1,29 @@ +import * as fs from 'fs' +import * as path from 'path' + +import {GolangJsonParser} from '../src/parsers/golang-json/golang-json-parser' +import {ParseOptions} from '../src/test-parser' +import {getReport} from '../src/report/get-report' +import {normalizeFilePath} from '../src/utils/path-utils' + +describe('golang-json tests', () => { + it('report from ./reports/dotnet test results matches snapshot', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'golang-json.json') + const outputPath = path.join(__dirname, '__outputs__', 'golang-json.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: ['calculator.go', 'calculator_test.go'] + } + + const parser = new GolangJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) +}) diff --git a/__tests__/java-junit.test.ts b/__tests__/java-junit.test.ts index a2ee944..83a7dec 100644 --- a/__tests__/java-junit.test.ts +++ b/__tests__/java-junit.test.ts @@ -3,7 +3,7 @@ import * as path from 'path' import {JavaJunitParser} from '../src/parsers/java-junit/java-junit-parser' import {ParseOptions} from '../src/test-parser' -import {getReport} from '../src/report/get-report' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' import {normalizeFilePath} from '../src/utils/path-utils' describe('java-junit tests', () => { @@ -72,4 +72,84 @@ describe('java-junit tests', () => { fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) + + it('parses empty failures in test results', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'external', 'java', 'empty_failures.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const trackedFiles: string[] = [] + const opts: ParseOptions = { + parseErrors: true, + trackedFiles + } + + const parser = new JavaJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + + expect(result.result === 'failed') + expect(result.failed === 1) + }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'junit-with-message.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JavaJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'junit-with-message.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JavaJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'empty', 'java-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JavaJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) }) diff --git a/__tests__/java-stack-trace-element-parser.test.ts b/__tests__/java-stack-trace-element-parser.test.ts new file mode 100644 index 0000000..6fe1ac2 --- /dev/null +++ b/__tests__/java-stack-trace-element-parser.test.ts @@ -0,0 +1,75 @@ +import {parseStackTraceElement} from '../src/parsers/java-junit/java-stack-trace-element-parser' + +describe('parseStackTraceLine tests', () => { + it('empty line is not parsed', async () => { + const line = '' + expect(parseStackTraceElement(line)).toBe(undefined) + }) + + describe('java class', () => { + it('simple', async () => { + const line = + 'at org.apache.pulsar.AddMissingPatchVersionTest.testVersionStrings(AddMissingPatchVersionTest.java:29)' + expect(parseStackTraceElement(line)).toEqual({ + tracePath: 'org.apache.pulsar.AddMissingPatchVersionTest.testVersionStrings', + fileName: 'AddMissingPatchVersionTest.java', + lineStr: '29' + }) + }) + + it('inner class', async () => { + const line = 'at com.foo.Main$Inner.run(Main.java:29)' + expect(parseStackTraceElement(line)).toEqual({ + tracePath: 'com.foo.Main$Inner.run', + fileName: 'Main.java', + lineStr: '29' + }) + }) + + it('starts with whitespaces', async () => { + const line = + ' \tat org.apache.pulsar.AddMissingPatchVersionTest.testVersionStrings(AddMissingPatchVersionTest.java:29)' + expect(parseStackTraceElement(line)).toEqual({ + tracePath: 'org.apache.pulsar.AddMissingPatchVersionTest.testVersionStrings', + fileName: 'AddMissingPatchVersionTest.java', + lineStr: '29' + }) + }) + + describe('since Java 9', () => { + it('with classloader and module', async () => { + // Based on Java 9 StackTraceElement.toString() Doc: https://docs.oracle.com/javase/9/docs/api/java/lang/StackTraceElement.html#toString-- + const line = 'at com.foo.loader/foo@9.0/com.foo.Main.run(Main.java:101)' + expect(parseStackTraceElement(line)).toEqual({ + classLoader: 'com.foo.loader', + moduleNameAndVersion: 'foo@9.0', + tracePath: 'com.foo.Main.run', + fileName: 'Main.java', + lineStr: '101' + }) + }) + + it('with classloader', async () => { + const line = 'at com.foo.loader//com.foo.Main.run(Main.java:101)' + expect(parseStackTraceElement(line)).toEqual({ + classLoader: 'com.foo.loader', + moduleNameAndVersion: undefined, + tracePath: 'com.foo.Main.run', + fileName: 'Main.java', + lineStr: '101' + }) + }) + }) + }) + + describe('Kotlin class', () => { + it('method name containing whitespaces', async () => { + const line = 'at com.foo.Main.method with whitespaces(Main.kt:18)' + expect(parseStackTraceElement(line)).toEqual({ + tracePath: 'com.foo.Main.method with whitespaces', + fileName: 'Main.kt', + lineStr: '18' + }) + }) + }) +}) diff --git a/__tests__/jest-junit.test.ts b/__tests__/jest-junit.test.ts index 0a5703e..912ebde 100644 --- a/__tests__/jest-junit.test.ts +++ b/__tests__/jest-junit.test.ts @@ -3,11 +3,11 @@ import * as path from 'path' import {JestJunitParser} from '../src/parsers/jest-junit/jest-junit-parser' import {ParseOptions} from '../src/test-parser' -import {getReport} from '../src/report/get-report' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' import {normalizeFilePath} from '../src/utils/path-utils' describe('jest-junit tests', () => { - it('produces empty test run result when there are no test cases', async () => { + it('produces empty test run result when there are no test cases in the testsuites element', async () => { const fixturePath = path.join(__dirname, 'fixtures', 'empty', 'jest-junit.xml') const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) @@ -23,6 +23,22 @@ describe('jest-junit tests', () => { expect(result.result).toBe('success') }) + it('produces empty test run result when there are no test cases in a nested testsuite element', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'empty', 'jest-junit-empty-testsuite.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result.tests).toBe(0) + expect(result.result).toBe('success') + }) + it('report from ./reports/jest test results matches snapshot', async () => { const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') const outputPath = path.join(__dirname, '__outputs__', 'jest-junit.md') @@ -66,4 +82,268 @@ describe('jest-junit tests', () => { fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) + + it('report from #235 testing react components named ', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'external', 'jest', 'jest-react-component-test-results.xml') + const trackedFilesPath = path.join(__dirname, 'fixtures', 'external', 'jest', 'files.txt') + const outputPath = path.join(__dirname, '__outputs__', 'jest-react-component-test-results.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const trackedFiles = fs.readFileSync(trackedFilesPath, {encoding: 'utf8'}).split(/\n\r?/g) + const opts: ParseOptions = { + parseErrors: true, + trackedFiles + //workDir: '/home/dorny/dorny/jest/' + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('parsing ESLint report without timing information works - PR #134', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit-eslint.xml') + const outputPath = path.join(__dirname, '__outputs__', 'jest-junit-eslint.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: ['test.js'] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('parsing junit report with message succeeds', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'junit-with-message.xml') + const outputPath = path.join(__dirname, '__outputs__', 'junit-with-message.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: ['test.js'] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) + + it('report can be collapsed when configured', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + collapsed: 'always' + }) + // Report should include collapsible details + expect(report).toContain('
Expand for details') + expect(report).toContain('
') + }) + + it('report is not collapsed when configured to never', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + collapsed: 'never' + }) + // Report should not include collapsible details + expect(report).not.toContain('
Expand for details') + expect(report).not.toContain('
') + }) + + it('report auto-collapses when all tests pass', async () => { + // Test with a fixture that has all passing tests (no failures) + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit-eslint.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + + // Verify this fixture has no failures + expect(result.failed).toBe(0) + + const report = getReport([result], { + ...DEFAULT_OPTIONS, + collapsed: 'auto' + }) + + // Should collapse when all tests pass + expect(report).toContain('
Expand for details') + expect(report).toContain('
') + }) + + it('report does not auto-collapse when tests fail', async () => { + // Test with a fixture that has failing tests + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + + // Verify this fixture has failures + expect(result.failed).toBeGreaterThan(0) + + const report = getReport([result], { + ...DEFAULT_OPTIONS, + collapsed: 'auto' + }) + + // Should not collapse when there are failures + expect(report).not.toContain('
Expand for details') + expect(report).not.toContain('
') + }) + + it('report includes the short summary', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const shortSummary = '1 passed, 4 failed and 1 skipped' + const report = getReport([result], DEFAULT_OPTIONS, shortSummary) + // Report should have the title as the first line + expect(report).toMatch(/^## 1 passed, 4 failed and 1 skipped\n/) + }) + + it('report includes a custom report title and short summary', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new JestJunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const shortSummary = '1 passed, 4 failed and 1 skipped' + const report = getReport( + [result], + { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }, + shortSummary + ) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n## 1 passed, 4 failed and 1 skipped\n/) + }) }) diff --git a/__tests__/mocha-json.test.ts b/__tests__/mocha-json.test.ts index 05393fa..1272962 100644 --- a/__tests__/mocha-json.test.ts +++ b/__tests__/mocha-json.test.ts @@ -3,7 +3,7 @@ import * as path from 'path' import {MochaJsonParser} from '../src/parsers/mocha-json/mocha-json-parser' import {ParseOptions} from '../src/test-parser' -import {getReport} from '../src/report/get-report' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' import {normalizeFilePath} from '../src/utils/path-utils' describe('mocha-json tests', () => { @@ -64,4 +64,66 @@ describe('mocha-json tests', () => { fs.mkdirSync(path.dirname(outputPath), {recursive: true}) fs.writeFileSync(outputPath, report) }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'mocha-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new MochaJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'mocha-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new MochaJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'mocha-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new MochaJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) }) diff --git a/__tests__/python-xunit.test.ts b/__tests__/python-xunit.test.ts new file mode 100644 index 0000000..c1550a4 --- /dev/null +++ b/__tests__/python-xunit.test.ts @@ -0,0 +1,93 @@ +import * as fs from 'fs' +import * as path from 'path' + +import {PythonXunitParser} from '../src/parsers/python-xunit/python-xunit-parser' +import {ParseOptions} from '../src/test-parser' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' +import {normalizeFilePath} from '../src/utils/path-utils' + +const defaultOpts: ParseOptions = { + parseErrors: true, + trackedFiles: [] +} + +describe('python-xunit unittest report', () => { + const fixturePath = path.join(__dirname, 'fixtures', 'python-xunit-unittest.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + const outputPath = path.join(__dirname, '__outputs__', 'python-xunit-unittest.md') + + it('report from python test results matches snapshot', async () => { + const trackedFiles = ['tests/test_lib.py'] + const opts: ParseOptions = { + ...defaultOpts, + trackedFiles + } + + const parser = new PythonXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('report does not include a title by default', async () => { + const parser = new PythonXunitParser(defaultOpts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const parser = new PythonXunitParser(defaultOpts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const parser = new PythonXunitParser(defaultOpts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) +}) + +describe('python-xunit pytest report', () => { + const fixturePath = path.join(__dirname, 'fixtures', 'python-xunit-pytest.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + const outputPath = path.join(__dirname, '__outputs__', 'python-xunit-pytest.md') + + it('report from python test results matches snapshot', async () => { + const trackedFiles = ['tests/test_lib.py'] + const opts: ParseOptions = { + ...defaultOpts, + trackedFiles + } + + const parser = new PythonXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) +}) diff --git a/__tests__/report/get-report.test.ts b/__tests__/report/get-report.test.ts new file mode 100644 index 0000000..670b0ad --- /dev/null +++ b/__tests__/report/get-report.test.ts @@ -0,0 +1,120 @@ +import {getBadge, DEFAULT_OPTIONS, ReportOptions} from '../../src/report/get-report' + +describe('getBadge', () => { + describe('URI encoding with special characters', () => { + it('generates correct URI with simple badge title', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'tests' + } + const badge = getBadge(5, 0, 1, options) + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/tests-5%20passed%2C%201%20skipped-success)') + }) + + it('handles badge title with single hyphen', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'unit-tests' + } + const badge = getBadge(3, 0, 0, options) + // The hyphen in the badge title should be encoded as -- + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/unit--tests-3%20passed-success)') + }) + + it('handles badge title with multiple hyphens', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'integration-api-tests' + } + const badge = getBadge(10, 0, 0, options) + // All hyphens in the title should be encoded as -- + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/integration--api--tests-10%20passed-success)') + }) + + it('handles badge title with multiple underscores', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'my_integration_test' + } + const badge = getBadge(10, 0, 0, options) + // All underscores in the title should be encoded as __ + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/my__integration__test-10%20passed-success)') + }) + + it('handles badge title with version format containing hyphen', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'MariaDb 12.0-ubi database tests' + } + const badge = getBadge(1, 0, 0, options) + // The hyphen in "12.0-ubi" should be encoded as -- + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/MariaDb%2012.0--ubi%20database%20tests-1%20passed-success)') + }) + + it('handles badge title with dots and hyphens', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'v1.2.3-beta-test' + } + const badge = getBadge(4, 1, 0, options) + expect(badge).toBe('![Tests failed](https://img.shields.io/badge/v1.2.3--beta--test-4%20passed%2C%201%20failed-critical)') + }) + + it('preserves structural hyphens between label and message', () => { + const options: ReportOptions = { + ...DEFAULT_OPTIONS, + badgeTitle: 'test-suite' + } + const badge = getBadge(2, 3, 1, options) + // The URI should have literal hyphens separating title-message-color + expect(badge).toBe('![Tests failed](https://img.shields.io/badge/test--suite-2%20passed%2C%203%20failed%2C%201%20skipped-critical)') + }) + }) + + describe('generates test outcome as color name for imgshields', () => { + it('uses success color when all tests pass', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(5, 0, 0, options) + expect(badge).toContain('-success)') + }) + + it('uses critical color when tests fail', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(5, 2, 0, options) + expect(badge).toContain('-critical)') + }) + + it('uses yellow color when no tests found', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(0, 0, 0, options) + expect(badge).toContain('-yellow)') + }) + }) + + describe('badge message composition', () => { + it('includes only passed count when no failures or skips', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(5, 0, 0, options) + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/tests-5%20passed-success)') + }) + + it('includes passed and failed counts', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(5, 2, 0, options) + expect(badge).toBe('![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%202%20failed-critical)') + }) + + it('includes passed, failed and skipped counts', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(5, 2, 1, options) + expect(badge).toBe('![Tests failed](https://img.shields.io/badge/tests-5%20passed%2C%202%20failed%2C%201%20skipped-critical)') + }) + + it('uses "none" message when no tests', () => { + const options: ReportOptions = {...DEFAULT_OPTIONS} + const badge = getBadge(0, 0, 0, options) + expect(badge).toBe('![Tests passed successfully](https://img.shields.io/badge/tests-none-yellow)') + }) + }) +}) + diff --git a/__tests__/rspec-json.test.ts b/__tests__/rspec-json.test.ts new file mode 100644 index 0000000..787420b --- /dev/null +++ b/__tests__/rspec-json.test.ts @@ -0,0 +1,107 @@ +import * as fs from 'fs' +import * as path from 'path' + +import {RspecJsonParser} from '../src/parsers/rspec-json/rspec-json-parser' +import {ParseOptions} from '../src/test-parser' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' +import {normalizeFilePath} from '../src/utils/path-utils' + +describe('rspec-json tests', () => { + it('produces empty test run result when there are no test cases', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'empty', 'rspec-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new RspecJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result.tests).toBe(0) + expect(result.result).toBe('success') + }) + + it('report from ./reports/rspec-json test results matches snapshot', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'rspec-json.json') + const outputPath = path.join(__dirname, '__outputs__', 'rspec-json.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: ['test/main.test.js', 'test/second.test.js', 'lib/main.js'] + } + + const parser = new RspecJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'rspec-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new RspecJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'rspec-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new RspecJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'rspec-json.json') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new RspecJsonParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) +}) diff --git a/__tests__/swift-xunit.test.ts b/__tests__/swift-xunit.test.ts new file mode 100644 index 0000000..9f063ee --- /dev/null +++ b/__tests__/swift-xunit.test.ts @@ -0,0 +1,92 @@ +import * as fs from 'fs' +import * as path from 'path' + +import {SwiftXunitParser} from '../src/parsers/swift-xunit/swift-xunit-parser' +import {ParseOptions} from '../src/test-parser' +import {DEFAULT_OPTIONS, getReport} from '../src/report/get-report' +import {normalizeFilePath} from '../src/utils/path-utils' + +describe('swift-xunit tests', () => { + it('report from swift test results matches snapshot', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'swift-xunit.xml') + const outputPath = path.join(__dirname, '__outputs__', 'swift-xunit.md') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const trackedFiles = ['Package.swift', 'Sources/AcmeLib/AcmeLib.swift', 'Tests/AcmeLibTests/AcmeLibTests.swift'] + const opts: ParseOptions = { + parseErrors: true, + trackedFiles + } + + const parser = new SwiftXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + expect(result).toMatchSnapshot() + + const report = getReport([result]) + fs.mkdirSync(path.dirname(outputPath), {recursive: true}) + fs.writeFileSync(outputPath, report) + }) + + it('report does not include a title by default', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'swift-xunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new SwiftXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result]) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it.each([ + ['empty string', ''], + ['space', ' '], + ['tab', '\t'], + ['newline', '\n'] + ])('report does not include a title when configured value is %s', async (_, reportTitle) => { + const fixturePath = path.join(__dirname, 'fixtures', 'swift-xunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new SwiftXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle + }) + // Report should have the badge as the first line + expect(report).toMatch(/^!\[Tests failed]/) + }) + + it('report includes a custom report title', async () => { + const fixturePath = path.join(__dirname, 'fixtures', 'swift-xunit.xml') + const filePath = normalizeFilePath(path.relative(__dirname, fixturePath)) + const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'}) + + const opts: ParseOptions = { + parseErrors: true, + trackedFiles: [] + } + + const parser = new SwiftXunitParser(opts) + const result = await parser.parse(filePath, fileContent) + const report = getReport([result], { + ...DEFAULT_OPTIONS, + reportTitle: 'My Custom Title' + }) + // Report should have the title as the first line + expect(report).toMatch(/^# My Custom Title\n/) + }) +}) diff --git a/__tests__/utils/parse-utils.test.ts b/__tests__/utils/parse-utils.test.ts index 83689ef..0f02867 100644 --- a/__tests__/utils/parse-utils.test.ts +++ b/__tests__/utils/parse-utils.test.ts @@ -32,6 +32,6 @@ describe('parseNetDuration', () => { }) it('throws when string has invalid format', () => { - expect(() => parseNetDuration('12:34:56 not a duration')).toThrowError(/^Invalid format/) + expect(() => parseNetDuration('12:34:56 not a duration')).toThrow(/^Invalid format/) }) }) diff --git a/action.yml b/action.yml index 402c451..530435c 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,5 @@ name: Test Reporter -description: | - Shows test results in GitHub UI: .NET (xUnit, NUnit, MSTest), Dart, Flutter, Java (JUnit), JavaScript (JEST, Mocha) +description: Displays test results from popular testing frameworks directly in GitHub author: Michal Dorner inputs: artifact: @@ -11,48 +10,94 @@ inputs: required: true path: description: | - Coma separated list of paths to test results + Comma-separated list of paths to test results Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob) All matched result files must be of same format required: true + path-replace-backslashes: + description: | + The fast-glob library that is internally used interprets backslashes as escape characters. + If enabled, all backslashes in provided path will be replaced by forward slashes and act as directory separators. + It might be useful when path input variable is composed dynamically from existing directory paths on Windows. + default: 'false' + required: false reporter: description: | Format of test results. Supported options: - dart-json + - dotnet-nunit - dotnet-trx - flutter-json + - golang-json - java-junit - jest-junit - mocha-json + - python-xunit + - rspec-json + - swift-xunit required: true list-suites: description: | Limits which test suites are listed. Supported options: - all - - only-failed - required: true + - failed + - none + required: false default: 'all' list-tests: description: | Limits which test cases are listed. Supported options: - all - - only-failed + - failed - none - required: true + required: false default: 'all' max-annotations: description: | Limits number of created annotations with error message and stack trace captured during test execution. Must be less or equal to 50. - required: true + required: false default: '10' fail-on-error: description: Set this action as failed if test report contain any failed test + required: false + default: 'true' + fail-on-empty: + description: Set this action as failed if no test results were found required: true default: 'true' working-directory: description: Relative path under $GITHUB_WORKSPACE where the repository was checked out required: false + report-title: + description: Title for the test report summary + required: false + default: '' + only-summary: + description: | + Allows you to generate only the summary. + If enabled, the report will contain a table listing each test results file and the number of passed, failed, and skipped tests. + Detailed listing of test suites and test cases will be skipped. + default: 'false' + required: false + use-actions-summary: + description: | + Allows you to generate reports for Actions Summary + https://github.com/orgs/github/teams/engineering/discussions/871 + default: 'true' + required: false + badge-title: + description: Customize badge title + required: false + default: 'tests' + collapsed: + description: | + Controls whether test report details are collapsed or expanded. Supported options: + - auto: Collapse only if all tests pass (default behavior) + - always: Always collapse the report details + - never: Always expand the report details + required: false + default: 'auto' token: description: GitHub Access Token required: false @@ -71,8 +116,12 @@ outputs: description: Count of skipped tests time: description: Test execution time [ms] + url: + description: Check run URL + url_html: + description: Check run URL HTML runs: - using: 'node12' + using: 'node20' main: 'dist/index.js' branding: color: blue diff --git a/dist/index.js b/dist/index.js index c5ed7f7..42cb52e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,15 +1,18 @@ -require('./sourcemap-register.js');module.exports = /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7171: +/***/ 4548: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -19,24 +22,44 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ArtifactProvider = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const github = __importStar(__nccwpck_require__(5438)); -const adm_zip_1 = __importDefault(__nccwpck_require__(6761)); -const picomatch_1 = __importDefault(__nccwpck_require__(8569)); -const github_utils_1 = __nccwpck_require__(3522); +const core = __importStar(__nccwpck_require__(7484)); +const github = __importStar(__nccwpck_require__(3228)); +const adm_zip_1 = __importDefault(__nccwpck_require__(1316)); +const picomatch_1 = __importDefault(__nccwpck_require__(4006)); +const github_utils_1 = __nccwpck_require__(6667); class ArtifactProvider { + octokit; + artifact; + name; + pattern; + sha; + runId; + token; + artifactNameMatch; + fileNameMatch; + getReportName; constructor(octokit, artifact, name, pattern, sha, runId, token) { this.octokit = octokit; this.artifact = artifact; @@ -67,11 +90,11 @@ class ArtifactProvider { this.artifactNameMatch = (str) => str === this.artifact; this.getReportName = () => this.name; } - this.fileNameMatch = picomatch_1.default(pattern); + this.fileNameMatch = (0, picomatch_1.default)(pattern); } async load() { const result = {}; - const resp = await this.octokit.actions.listWorkflowRunArtifacts({ + const resp = await this.octokit.rest.actions.listWorkflowRunArtifacts({ ...github.context.repo, run_id: this.runId }); @@ -86,7 +109,7 @@ class ArtifactProvider { } for (const art of artifacts) { const fileName = `${art.name}.zip`; - await github_utils_1.downloadArtifact(this.octokit, art.id, fileName, this.token); + await (0, github_utils_1.downloadArtifact)(this.octokit, art.id, fileName, this.token); core.startGroup(`Reading archive ${fileName}`); try { const reportName = this.getReportName(art.name); @@ -121,7 +144,7 @@ class ArtifactProvider { return result; } async listTrackedFiles() { - return github_utils_1.listFiles(this.octokit, this.sha); + return (0, github_utils_1.listFiles)(this.octokit, this.sha); } } exports.ArtifactProvider = ArtifactProvider; @@ -129,14 +152,18 @@ exports.ArtifactProvider = ArtifactProvider; /***/ }), -/***/ 9399: +/***/ 922: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -146,22 +173,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LocalFileProvider = void 0; -const fs = __importStar(__nccwpck_require__(5747)); -const fast_glob_1 = __importDefault(__nccwpck_require__(3664)); -const git_1 = __nccwpck_require__(9844); +const fs = __importStar(__nccwpck_require__(9896)); +const fast_glob_1 = __importDefault(__nccwpck_require__(5648)); +const git_1 = __nccwpck_require__(5454); class LocalFileProvider { + name; + pattern; constructor(name, pattern) { this.name = name; this.pattern = pattern; @@ -169,7 +208,7 @@ class LocalFileProvider { async load() { const result = []; for (const pat of this.pattern) { - const paths = await fast_glob_1.default(pat, { dot: true }); + const paths = await (0, fast_glob_1.default)(pat, { dot: true }); for (const file of paths) { const content = await fs.promises.readFile(file, { encoding: 'utf8' }); result.push({ file, content }); @@ -178,7 +217,7 @@ class LocalFileProvider { return { [this.name]: result }; } async listTrackedFiles() { - return git_1.listFiles(); + return (0, git_1.listFiles)(); } } exports.LocalFileProvider = LocalFileProvider; @@ -186,14 +225,18 @@ exports.LocalFileProvider = LocalFileProvider; /***/ }), -/***/ 3109: +/***/ 5915: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -203,52 +246,77 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -const core = __importStar(__nccwpck_require__(2186)); -const github = __importStar(__nccwpck_require__(5438)); -const artifact_provider_1 = __nccwpck_require__(7171); -const local_file_provider_1 = __nccwpck_require__(9399); -const get_annotations_1 = __nccwpck_require__(5867); -const get_report_1 = __nccwpck_require__(3737); -const dart_json_parser_1 = __nccwpck_require__(4528); -const dotnet_trx_parser_1 = __nccwpck_require__(2664); -const java_junit_parser_1 = __nccwpck_require__(676); -const jest_junit_parser_1 = __nccwpck_require__(1113); -const mocha_json_parser_1 = __nccwpck_require__(6043); -const path_utils_1 = __nccwpck_require__(4070); -const github_utils_1 = __nccwpck_require__(3522); -const markdown_utils_1 = __nccwpck_require__(6482); +const core = __importStar(__nccwpck_require__(7484)); +const github = __importStar(__nccwpck_require__(3228)); +const artifact_provider_1 = __nccwpck_require__(4548); +const local_file_provider_1 = __nccwpck_require__(922); +const get_annotations_1 = __nccwpck_require__(4400); +const get_report_1 = __nccwpck_require__(7070); +const dart_json_parser_1 = __nccwpck_require__(1254); +const dotnet_nunit_parser_1 = __nccwpck_require__(6394); +const dotnet_trx_parser_1 = __nccwpck_require__(1658); +const golang_json_parser_1 = __nccwpck_require__(5162); +const java_junit_parser_1 = __nccwpck_require__(8342); +const jest_junit_parser_1 = __nccwpck_require__(1042); +const mocha_json_parser_1 = __nccwpck_require__(5402); +const python_xunit_parser_1 = __nccwpck_require__(6578); +const rspec_json_parser_1 = __nccwpck_require__(9768); +const swift_xunit_parser_1 = __nccwpck_require__(7330); +const path_utils_1 = __nccwpck_require__(9132); +const github_utils_1 = __nccwpck_require__(6667); async function main() { try { const testReporter = new TestReporter(); await testReporter.run(); } catch (error) { - core.setFailed(error.message); + if (error instanceof Error) + core.setFailed(error); + else + core.setFailed(JSON.stringify(error)); } } class TestReporter { + artifact = core.getInput('artifact', { required: false }); + name = core.getInput('name', { required: true }); + path = core.getInput('path', { required: true }); + pathReplaceBackslashes = core.getInput('path-replace-backslashes', { required: false }) === 'true'; + reporter = core.getInput('reporter', { required: true }); + listSuites = core.getInput('list-suites', { required: true }); + listTests = core.getInput('list-tests', { required: true }); + maxAnnotations = parseInt(core.getInput('max-annotations', { required: true })); + failOnError = core.getInput('fail-on-error', { required: true }) === 'true'; + failOnEmpty = core.getInput('fail-on-empty', { required: true }) === 'true'; + workDirInput = core.getInput('working-directory', { required: false }); + onlySummary = core.getInput('only-summary', { required: false }) === 'true'; + useActionsSummary = core.getInput('use-actions-summary', { required: false }) === 'true'; + badgeTitle = core.getInput('badge-title', { required: false }); + reportTitle = core.getInput('report-title', { required: false }); + collapsed = core.getInput('collapsed', { required: false }); + token = core.getInput('token', { required: true }); + octokit; + context = (0, github_utils_1.getCheckRunContext)(); constructor() { - this.artifact = core.getInput('artifact', { required: false }); - this.name = core.getInput('name', { required: true }); - this.path = core.getInput('path', { required: true }); - this.reporter = core.getInput('reporter', { required: true }); - this.listSuites = core.getInput('list-suites', { required: true }); - this.listTests = core.getInput('list-tests', { required: true }); - this.maxAnnotations = parseInt(core.getInput('max-annotations', { required: true })); - this.failOnError = core.getInput('fail-on-error', { required: true }) === 'true'; - this.workDirInput = core.getInput('working-directory', { required: false }); - this.token = core.getInput('token', { required: true }); - this.context = github_utils_1.getCheckRunContext(); this.octokit = github.getOctokit(this.token); - if (this.listSuites !== 'all' && this.listSuites !== 'failed') { + if (this.listSuites !== 'all' && this.listSuites !== 'failed' && this.listSuites !== 'none') { core.setFailed(`Input parameter 'list-suites' has invalid value`); return; } @@ -256,6 +324,10 @@ class TestReporter { core.setFailed(`Input parameter 'list-tests' has invalid value`); return; } + if (this.collapsed !== 'auto' && this.collapsed !== 'always' && this.collapsed !== 'never') { + core.setFailed(`Input parameter 'collapsed' has invalid value`); + return; + } if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) { core.setFailed(`Input parameter 'max-annotations' has invalid value`); return; @@ -267,14 +339,18 @@ class TestReporter { process.chdir(this.workDirInput); } core.info(`Check runs will be created with SHA=${this.context.sha}`); - const pattern = this.path.split(','); + // Split path pattern by ',' and optionally convert all backslashes to forward slashes + // fast-glob (micromatch) always interprets backslashes as escape characters instead of directory separators + const pathsList = this.path.split(','); + const pattern = this.pathReplaceBackslashes ? pathsList.map(path_utils_1.normalizeFilePath) : pathsList; const inputProvider = this.artifact ? new artifact_provider_1.ArtifactProvider(this.octokit, this.artifact, this.name, pattern, this.context.sha, this.context.runId, this.token) : new local_file_provider_1.LocalFileProvider(this.name, pattern); const parseErrors = this.maxAnnotations > 0; - const trackedFiles = await inputProvider.listTrackedFiles(); - const workDir = this.artifact ? undefined : path_utils_1.normalizeDirPath(process.cwd(), true); - core.info(`Found ${trackedFiles.length} files tracked by GitHub`); + const trackedFiles = parseErrors ? await inputProvider.listTrackedFiles() : []; + const workDir = this.artifact ? undefined : (0, path_utils_1.normalizeDirPath)(process.cwd(), true); + if (parseErrors) + core.info(`Found ${trackedFiles.length} files tracked by GitHub`); const options = { workDir, trackedFiles, @@ -309,7 +385,7 @@ class TestReporter { core.setFailed(`Failed test were found and 'fail-on-error' option is set to ${this.failOnError}`); return; } - if (results.length === 0) { + if (results.length === 0 && this.failOnEmpty) { core.setFailed(`No test report files were found`); return; } @@ -319,55 +395,97 @@ class TestReporter { core.warning(`No file matches path ${this.path}`); return []; } + core.info(`Processing test results for check run ${name}`); const results = []; for (const { file, content } of files) { - core.info(`Processing test results from ${file}`); - const tr = await parser.parse(file, content); - results.push(tr); + try { + const tr = await parser.parse(file, content); + results.push(tr); + } + catch (error) { + core.error(`Processing test results from ${file} failed`); + throw error; + } + } + const { listSuites, listTests, onlySummary, useActionsSummary, badgeTitle, reportTitle, collapsed } = this; + const passed = results.reduce((sum, tr) => sum + tr.passed, 0); + const failed = results.reduce((sum, tr) => sum + tr.failed, 0); + const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0); + const shortSummary = `${passed} passed, ${failed} failed and ${skipped} skipped `; + let baseUrl = ''; + if (this.useActionsSummary) { + const summary = (0, get_report_1.getReport)(results, { + listSuites, + listTests, + baseUrl, + onlySummary, + useActionsSummary, + badgeTitle, + reportTitle, + collapsed + }, shortSummary); + core.info('Summary content:'); + core.info(summary); + await core.summary.addRaw(summary).write(); + } + else { + core.info(`Creating check run ${name}`); + const createResp = await this.octokit.rest.checks.create({ + head_sha: this.context.sha, + name, + status: 'in_progress', + output: { + title: name, + summary: '' + }, + ...github.context.repo + }); + core.info('Creating report summary'); + baseUrl = createResp.data.html_url; + const summary = (0, get_report_1.getReport)(results, { + listSuites, + listTests, + baseUrl, + onlySummary, + useActionsSummary, + badgeTitle, + reportTitle, + collapsed + }); + core.info('Creating annotations'); + const annotations = (0, get_annotations_1.getAnnotations)(results, this.maxAnnotations); + const isFailed = this.failOnError && results.some(tr => tr.result === 'failed'); + const conclusion = isFailed ? 'failure' : 'success'; + core.info(`Updating check run conclusion (${conclusion}) and output`); + const resp = await this.octokit.rest.checks.update({ + check_run_id: createResp.data.id, + conclusion, + status: 'completed', + output: { + title: shortSummary, + summary, + annotations + }, + ...github.context.repo + }); + core.info(`Check run create response: ${resp.status}`); + core.info(`Check run URL: ${resp.data.url}`); + core.info(`Check run HTML: ${resp.data.html_url}`); + core.setOutput('url', resp.data.url); + core.setOutput('url_html', resp.data.html_url); } - core.info(`Creating check run ${name}`); - const createResp = await this.octokit.checks.create({ - head_sha: this.context.sha, - name, - status: 'in_progress', - output: { - title: name, - summary: '' - }, - ...github.context.repo - }); - core.info('Creating report summary'); - const { listSuites, listTests } = this; - const baseUrl = createResp.data.html_url; - const summary = get_report_1.getReport(results, { listSuites, listTests, baseUrl }); - core.info('Creating annotations'); - const annotations = get_annotations_1.getAnnotations(results, this.maxAnnotations); - const isFailed = results.some(tr => tr.result === 'failed'); - const conclusion = isFailed ? 'failure' : 'success'; - const icon = isFailed ? markdown_utils_1.Icon.fail : markdown_utils_1.Icon.success; - core.info(`Updating check run conclusion (${conclusion}) and output`); - const resp = await this.octokit.checks.update({ - check_run_id: createResp.data.id, - conclusion, - status: 'completed', - output: { - title: `${name} ${icon}`, - summary, - annotations - }, - ...github.context.repo - }); - core.info(`Check run create response: ${resp.status}`); - core.info(`Check run URL: ${resp.data.url}`); - core.info(`Check run HTML: ${resp.data.html_url}`); return results; } getParser(reporter, options) { switch (reporter) { case 'dart-json': return new dart_json_parser_1.DartJsonParser(options, 'dart'); + case 'dotnet-nunit': + return new dotnet_nunit_parser_1.DotnetNunitParser(options); case 'dotnet-trx': return new dotnet_trx_parser_1.DotnetTrxParser(options); + case 'golang-json': + return new golang_json_parser_1.GolangJsonParser(options); case 'flutter-json': return new dart_json_parser_1.DartJsonParser(options, 'flutter'); case 'java-junit': @@ -376,6 +494,12 @@ class TestReporter { return new jest_junit_parser_1.JestJunitParser(options); case 'mocha-json': return new mocha_json_parser_1.MochaJsonParser(options); + case 'python-xunit': + return new python_xunit_parser_1.PythonXunitParser(options); + case 'rspec-json': + return new rspec_json_parser_1.RspecJsonParser(options); + case 'swift-xunit': + return new swift_xunit_parser_1.SwiftXunitParser(options); default: throw new Error(`Input variable 'reporter' is set to invalid value '${reporter}'`); } @@ -386,17 +510,21 @@ main(); /***/ }), -/***/ 4528: +/***/ 1254: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DartJsonParser = void 0; -const path_utils_1 = __nccwpck_require__(4070); -const dart_json_types_1 = __nccwpck_require__(7887); -const test_results_1 = __nccwpck_require__(2768); +const path_utils_1 = __nccwpck_require__(9132); +const dart_json_types_1 = __nccwpck_require__(7064); +const test_results_1 = __nccwpck_require__(613); class TestRun { + path; + suites; + success; + time; constructor(path, suites, success, time) { this.path = path; this.suites = suites; @@ -405,32 +533,37 @@ class TestRun { } } class TestSuite { + suite; constructor(suite) { this.suite = suite; - this.groups = {}; } + groups = {}; } class TestGroup { + group; constructor(group) { this.group = group; - this.tests = []; } + tests = []; } class TestCase { + testStart; constructor(testStart) { this.testStart = testStart; - this.print = []; this.groupId = testStart.test.groupIDs[testStart.test.groupIDs.length - 1]; } + groupId; + print = []; + testDone; + error; get result() { - var _a, _b, _c, _d; - if ((_a = this.testDone) === null || _a === void 0 ? void 0 : _a.skipped) { + if (this.testDone?.skipped) { return 'skipped'; } - if (((_b = this.testDone) === null || _b === void 0 ? void 0 : _b.result) === 'success') { + if (this.testDone?.result === 'success') { return 'success'; } - if (((_c = this.testDone) === null || _c === void 0 ? void 0 : _c.result) === 'error' || ((_d = this.testDone) === null || _d === void 0 ? void 0 : _d.result) === 'failure') { + if (this.testDone?.result === 'error' || this.testDone?.result === 'failure') { return 'failed'; } return undefined; @@ -440,6 +573,9 @@ class TestCase { } } class DartJsonParser { + options; + sdk; + assumedWorkDir; constructor(options, sdk) { this.options = options; this.sdk = sdk; @@ -460,7 +596,8 @@ class DartJsonParser { return JSON.parse(str); } catch (e) { - const col = e.columnNumber !== undefined ? `:${e.columnNumber}` : ''; + const errWithCol = e; + const col = errWithCol.columnNumber !== undefined ? `:${errWithCol.columnNumber}` : ''; throw new Error(`Invalid JSON at ${path}:${i + 1}${col}\n\n${e}`); } }) @@ -470,29 +607,29 @@ class DartJsonParser { const suites = {}; const tests = {}; for (const evt of events) { - if (dart_json_types_1.isSuiteEvent(evt)) { + if ((0, dart_json_types_1.isSuiteEvent)(evt)) { suites[evt.suite.id] = new TestSuite(evt.suite); } - else if (dart_json_types_1.isGroupEvent(evt)) { + else if ((0, dart_json_types_1.isGroupEvent)(evt)) { suites[evt.group.suiteID].groups[evt.group.id] = new TestGroup(evt.group); } - else if (dart_json_types_1.isTestStartEvent(evt) && evt.test.url !== null) { + else if ((0, dart_json_types_1.isTestStartEvent)(evt) && evt.test.url !== null) { const test = new TestCase(evt); const suite = suites[evt.test.suiteID]; const group = suite.groups[evt.test.groupIDs[evt.test.groupIDs.length - 1]]; group.tests.push(test); tests[evt.test.id] = test; } - else if (dart_json_types_1.isTestDoneEvent(evt) && !evt.hidden) { + else if ((0, dart_json_types_1.isTestDoneEvent)(evt) && tests[evt.testID]) { tests[evt.testID].testDone = evt; } - else if (dart_json_types_1.isErrorEvent(evt)) { + else if ((0, dart_json_types_1.isErrorEvent)(evt) && tests[evt.testID]) { tests[evt.testID].error = evt; } - else if (dart_json_types_1.isMessageEvent(evt)) { + else if ((0, dart_json_types_1.isMessageEvent)(evt) && tests[evt.testID]) { tests[evt.testID].print.push(evt); } - else if (dart_json_types_1.isDoneEvent(evt)) { + else if ((0, dart_json_types_1.isDoneEvent)(evt)) { success = evt.success; totalTime = evt.time; } @@ -507,10 +644,12 @@ class DartJsonParser { } getGroups(suite) { const groups = Object.values(suite.groups).filter(grp => grp.tests.length > 0); - groups.sort((a, b) => { var _a, _b; return ((_a = a.group.line) !== null && _a !== void 0 ? _a : 0) - ((_b = b.group.line) !== null && _b !== void 0 ? _b : 0); }); + groups.sort((a, b) => (a.group.line ?? 0) - (b.group.line ?? 0)); return groups.map(group => { - group.tests.sort((a, b) => { var _a, _b; return ((_a = a.testStart.test.line) !== null && _a !== void 0 ? _a : 0) - ((_b = b.testStart.test.line) !== null && _b !== void 0 ? _b : 0); }); - const tests = group.tests.map(tc => { + group.tests.sort((a, b) => (a.testStart.test.line ?? 0) - (b.testStart.test.line ?? 0)); + const tests = group.tests + .filter(tc => !tc.testDone?.hidden) + .map(tc => { const error = this.getError(suite, tc); const testName = group.group.name !== undefined && tc.testStart.test.name.startsWith(group.group.name) ? tc.testStart.test.name.slice(group.group.name.length).trim() @@ -521,19 +660,18 @@ class DartJsonParser { }); } getError(testSuite, test) { - var _a, _b, _c, _d, _e, _f; if (!this.options.parseErrors || !test.error) { return undefined; } const { trackedFiles } = this.options; - const stackTrace = (_b = (_a = test.error) === null || _a === void 0 ? void 0 : _a.stackTrace) !== null && _b !== void 0 ? _b : ''; + const stackTrace = test.error?.stackTrace ?? ''; const print = test.print .filter(p => p.messageType === 'print') .map(p => p.message) .join('\n'); const details = [print, stackTrace].filter(str => str !== '').join('\n'); const src = this.exceptionThrowSource(details, trackedFiles); - const message = this.getErrorMessage((_d = (_c = test.error) === null || _c === void 0 ? void 0 : _c.error) !== null && _d !== void 0 ? _d : '', print); + const message = this.getErrorMessage(test.error?.error ?? '', print); let path; let line; if (src !== undefined) { @@ -544,7 +682,7 @@ class DartJsonParser { const testStartPath = this.getRelativePath(testSuite.suite.path); if (trackedFiles.includes(testStartPath)) { path = testStartPath; - line = (_f = (_e = test.testStart.test.root_line) !== null && _e !== void 0 ? _e : test.testStart.test.line) !== null && _f !== void 0 ? _f : undefined; + line = test.testStart.test.root_line ?? test.testStart.test.line ?? undefined; } } return { @@ -577,7 +715,7 @@ class DartJsonParser { const match = str.match(re); if (match !== null) { const [_, pathStr, lineStr] = match; - const path = path_utils_1.normalizeFilePath(this.getRelativePath(pathStr)); + const path = (0, path_utils_1.normalizeFilePath)(this.getRelativePath(pathStr)); if (trackedFiles.includes(path)) { const line = parseInt(lineStr); return { path, line }; @@ -590,7 +728,7 @@ class DartJsonParser { if (path.startsWith(prefix)) { path = path.substr(prefix.length); } - path = path_utils_1.normalizeFilePath(path); + path = (0, path_utils_1.normalizeFilePath)(path); const workDir = this.getWorkDir(path); if (workDir !== undefined && path.startsWith(workDir)) { path = path.substr(workDir.length); @@ -598,8 +736,9 @@ class DartJsonParser { return path; } getWorkDir(path) { - var _a, _b; - return ((_b = (_a = this.options.workDir) !== null && _a !== void 0 ? _a : this.assumedWorkDir) !== null && _b !== void 0 ? _b : (this.assumedWorkDir = path_utils_1.getBasePath(path, this.options.trackedFiles))); + return (this.options.workDir ?? + this.assumedWorkDir ?? + (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles))); } } exports.DartJsonParser = DartJsonParser; @@ -607,64 +746,188 @@ exports.DartJsonParser = DartJsonParser; /***/ }), -/***/ 7887: +/***/ 7064: /***/ ((__unused_webpack_module, exports) => { "use strict"; /// reflects documentation at https://github.com/dart-lang/test/blob/master/pkgs/test/doc/json_reporter.md Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isMessageEvent = exports.isDoneEvent = exports.isErrorEvent = exports.isTestDoneEvent = exports.isTestStartEvent = exports.isGroupEvent = exports.isSuiteEvent = void 0; +exports.isSuiteEvent = isSuiteEvent; +exports.isGroupEvent = isGroupEvent; +exports.isTestStartEvent = isTestStartEvent; +exports.isTestDoneEvent = isTestDoneEvent; +exports.isErrorEvent = isErrorEvent; +exports.isDoneEvent = isDoneEvent; +exports.isMessageEvent = isMessageEvent; function isSuiteEvent(event) { return event.type === 'suite'; } -exports.isSuiteEvent = isSuiteEvent; function isGroupEvent(event) { return event.type === 'group'; } -exports.isGroupEvent = isGroupEvent; function isTestStartEvent(event) { return event.type === 'testStart'; } -exports.isTestStartEvent = isTestStartEvent; function isTestDoneEvent(event) { return event.type === 'testDone'; } -exports.isTestDoneEvent = isTestDoneEvent; function isErrorEvent(event) { return event.type === 'error'; } -exports.isErrorEvent = isErrorEvent; function isDoneEvent(event) { return event.type === 'done'; } -exports.isDoneEvent = isDoneEvent; function isMessageEvent(event) { return event.type === 'print'; } -exports.isMessageEvent = isMessageEvent; /***/ }), -/***/ 2664: +/***/ 6394: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DotnetNunitParser = void 0; +const xml2js_1 = __nccwpck_require__(758); +const node_utils_1 = __nccwpck_require__(5384); +const path_utils_1 = __nccwpck_require__(9132); +const test_results_1 = __nccwpck_require__(613); +class DotnetNunitParser { + options; + assumedWorkDir; + constructor(options) { + this.options = options; + } + async parse(path, content) { + const ju = await this.getNunitReport(path, content); + return this.getTestRunResult(path, ju); + } + async getNunitReport(path, content) { + try { + return (await (0, xml2js_1.parseStringPromise)(content)); + } + catch (e) { + throw new Error(`Invalid XML at ${path}\n\n${e}`); + } + } + getTestRunResult(path, nunit) { + const suites = []; + const time = parseFloat(nunit['test-run'].$.duration) * 1000; + this.populateTestCasesRecursive(suites, [], nunit['test-run']['test-suite']); + return new test_results_1.TestRunResult(path, suites, time); + } + populateTestCasesRecursive(result, suitePath, testSuites) { + if (testSuites === undefined) { + return; + } + for (const suite of testSuites) { + suitePath.push(suite); + this.populateTestCasesRecursive(result, suitePath, suite['test-suite']); + const testcases = suite['test-case']; + if (testcases !== undefined) { + for (const testcase of testcases) { + this.addTestCase(result, suitePath, testcase); + } + } + suitePath.pop(); + } + } + addTestCase(result, suitePath, testCase) { + // The last suite in the suite path is the "group". + // The rest are concatenated together to form the "suite". + // But ignore "Theory" suites. + const suitesWithoutTheories = suitePath.filter(suite => suite.$.type !== 'Theory'); + const suiteName = suitesWithoutTheories + .slice(0, suitesWithoutTheories.length - 1) + .map(suite => suite.$.name) + .join('.'); + const groupName = suitesWithoutTheories[suitesWithoutTheories.length - 1].$.name; + let existingSuite = result.find(suite => suite.name === suiteName); + if (existingSuite === undefined) { + existingSuite = new test_results_1.TestSuiteResult(suiteName, []); + result.push(existingSuite); + } + let existingGroup = existingSuite.groups.find(group => group.name === groupName); + if (existingGroup === undefined) { + existingGroup = new test_results_1.TestGroupResult(groupName, []); + existingSuite.groups.push(existingGroup); + } + existingGroup.tests.push(new test_results_1.TestCaseResult(testCase.$.name, this.getTestExecutionResult(testCase), parseFloat(testCase.$.duration) * 1000, this.getTestCaseError(testCase))); + } + getTestExecutionResult(test) { + if (test.$.result === 'Failed' || test.failure) + return 'failed'; + if (test.$.result === 'Skipped') + return 'skipped'; + return 'success'; + } + getTestCaseError(tc) { + if (!this.options.parseErrors || !tc.failure || tc.failure.length === 0) { + return undefined; + } + const details = tc.failure[0]; + let path; + let line; + if (details['stack-trace'] !== undefined && details['stack-trace'].length > 0) { + const src = (0, node_utils_1.getExceptionSource)(details['stack-trace'][0], this.options.trackedFiles, file => this.getRelativePath(file)); + if (src) { + path = src.path; + line = src.line; + } + } + return { + path, + line, + message: details.message && details.message.length > 0 ? details.message[0] : '', + details: details['stack-trace'] && details['stack-trace'].length > 0 ? details['stack-trace'][0] : '' + }; + } + getRelativePath(path) { + path = (0, path_utils_1.normalizeFilePath)(path); + const workDir = this.getWorkDir(path); + if (workDir !== undefined && path.startsWith(workDir)) { + path = path.substr(workDir.length); + } + return path; + } + getWorkDir(path) { + return (this.options.workDir ?? + this.assumedWorkDir ?? + (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles))); + } +} +exports.DotnetNunitParser = DotnetNunitParser; + + +/***/ }), + +/***/ 1658: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DotnetTrxParser = void 0; -const xml2js_1 = __nccwpck_require__(6189); -const path_utils_1 = __nccwpck_require__(4070); -const parse_utils_1 = __nccwpck_require__(7811); -const test_results_1 = __nccwpck_require__(2768); +const xml2js_1 = __nccwpck_require__(758); +const path_utils_1 = __nccwpck_require__(9132); +const parse_utils_1 = __nccwpck_require__(9633); +const test_results_1 = __nccwpck_require__(613); class TestClass { + name; constructor(name) { this.name = name; - this.tests = []; } + tests = []; } class Test { + name; + outcome; + duration; + error; constructor(name, outcome, duration, error) { this.name = name; this.outcome = outcome; @@ -683,6 +946,8 @@ class Test { } } class DotnetTrxParser { + options; + assumedWorkDir; constructor(options) { this.options = options; } @@ -695,14 +960,15 @@ class DotnetTrxParser { } async getTrxReport(path, content) { try { - return (await xml2js_1.parseStringPromise(content)); + return (await (0, xml2js_1.parseStringPromise)(content)); } catch (e) { throw new Error(`Invalid XML at ${path}\n\n${e}`); } } getTestClasses(trx) { - if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined) { + if (trx.TestRun.TestDefinitions === undefined || trx.TestRun.Results === undefined || + !trx.TestRun.TestDefinitions.some(td => td.UnitTest && Array.isArray(td.UnitTest))) { return []; } const unitTests = {}; @@ -717,7 +983,7 @@ class DotnetTrxParser { })); const testClasses = {}; for (const r of unitTestsResults) { - const className = r.test.TestMethod[0].$.className; + const className = r.test.TestMethod[0].$.className ?? "Unclassified"; let tc = testClasses[className]; if (tc === undefined) { tc = new TestClass(className); @@ -725,7 +991,7 @@ class DotnetTrxParser { } const error = this.getErrorInfo(r.result); const durationAttr = r.result.$.duration; - const duration = durationAttr ? parse_utils_1.parseNetDuration(durationAttr) : 0; + const duration = durationAttr ? (0, parse_utils_1.parseNetDuration)(durationAttr) : 0; const resultTestName = r.result.$.testName; const testName = resultTestName.startsWith(className) && resultTestName[className.length] === '.' ? resultTestName.substr(className.length + 1) @@ -738,7 +1004,7 @@ class DotnetTrxParser { } getTestRunResult(path, trx, testClasses) { const times = trx.TestRun.Times[0].$; - const totalTime = parse_utils_1.parseIsoDate(times.finish).getTime() - parse_utils_1.parseIsoDate(times.start).getTime(); + const totalTime = (0, parse_utils_1.parseIsoDate)(times.finish).getTime() - (0, parse_utils_1.parseIsoDate)(times.start).getTime(); const suites = testClasses.map(testClass => { const tests = testClass.tests.map(test => { const error = this.getError(test); @@ -750,12 +1016,11 @@ class DotnetTrxParser { return new test_results_1.TestRunResult(path, suites, totalTime); } getErrorInfo(testResult) { - var _a; if (testResult.$.outcome !== 'Failed') { return undefined; } const output = testResult.Output; - const error = (output === null || output === void 0 ? void 0 : output.length) > 0 && ((_a = output[0].ErrorInfo) === null || _a === void 0 ? void 0 : _a.length) > 0 ? output[0].ErrorInfo[0] : undefined; + const error = output?.length > 0 && output[0].ErrorInfo?.length > 0 ? output[0].ErrorInfo[0] : undefined; return error; } getError(test) { @@ -763,14 +1028,14 @@ class DotnetTrxParser { return undefined; } const error = test.error; - if (!Array.isArray(error.Message) - || error.Message.length === 0 - || !Array.isArray(error.StackTrace) - || error.StackTrace.length === 0) { + if (!Array.isArray(error.Message) || + error.Message.length === 0 || + !Array.isArray(error.StackTrace) || + error.StackTrace.length === 0) { return undefined; } - const message = test.error.Message[0]; const stackTrace = test.error.StackTrace[0]; + const message = `${test.error.Message[0]}\n${stackTrace}`; let path; let line; const src = this.exceptionThrowSource(stackTrace); @@ -782,7 +1047,7 @@ class DotnetTrxParser { path, line, message, - details: `${message}\n${stackTrace}` + details: `${message}` }; } exceptionThrowSource(stackTrace) { @@ -793,7 +1058,7 @@ class DotnetTrxParser { const match = str.match(re); if (match !== null) { const [_, fileStr, lineStr] = match; - const filePath = path_utils_1.normalizeFilePath(fileStr); + const filePath = (0, path_utils_1.normalizeFilePath)(fileStr); const workDir = this.getWorkDir(filePath); if (workDir) { const file = filePath.substr(workDir.length); @@ -806,8 +1071,9 @@ class DotnetTrxParser { } } getWorkDir(path) { - var _a, _b; - return ((_b = (_a = this.options.workDir) !== null && _a !== void 0 ? _a : this.assumedWorkDir) !== null && _b !== void 0 ? _b : (this.assumedWorkDir = path_utils_1.getBasePath(path, this.options.trackedFiles))); + return (this.options.workDir ?? + this.assumedWorkDir ?? + (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles))); } } exports.DotnetTrxParser = DotnetTrxParser; @@ -815,14 +1081,118 @@ exports.DotnetTrxParser = DotnetTrxParser; /***/ }), -/***/ 676: +/***/ 5162: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.GolangJsonParser = void 0; +const test_results_1 = __nccwpck_require__(613); +class GolangJsonParser { + options; + assumedWorkDir; + constructor(options) { + this.options = options; + } + async parse(path, content) { + const events = await this.getGolangTestEvents(path, content); + return this.getTestRunResult(path, events); + } + async getGolangTestEvents(path, content) { + return content.trim().split('\n').map((line, index) => { + try { + return JSON.parse(line); + } + catch (e) { + throw new Error(`Invalid JSON at ${path} line ${index + 1}\n\n${e}`); + } + }); + } + getTestRunResult(path, events) { + const eventGroups = new Map(); + for (const event of events) { + if (!event.Test) { + continue; + } + const k = `${event.Package}/${event.Test}`; + let g = eventGroups.get(k); + if (!g) { + g = []; + eventGroups.set(k, g); + } + g.push(event); + } + const suites = []; + for (const eventGroup of eventGroups.values()) { + const event = eventGroup[0]; + let suite = suites.find(s => s.name === event.Package); + if (!suite) { + suite = new test_results_1.TestSuiteResult(event.Package, []); + suites.push(suite); + } + if (!event.Test) { + continue; + } + let groupName; + let rest; + [groupName, ...rest] = event.Test.split('/'); + let testName = rest.join('/'); + if (!testName) { + testName = groupName; + groupName = null; + } + let group = suite.groups.find(g => g.name === groupName); + if (!group) { + group = new test_results_1.TestGroupResult(groupName, []); + suite.groups.push(group); + } + const lastEvent = eventGroup.at(-1); + const result = lastEvent.Action === 'pass' ? 'success' + : lastEvent.Action === 'skip' ? 'skipped' + : 'failed'; + if (lastEvent.Elapsed === undefined) { + throw new Error('missing elapsed on final test event'); + } + const time = lastEvent.Elapsed * 1000; + let error = undefined; + if (result !== 'success') { + const outputEvents = eventGroup + .filter(e => e.Action === 'output') + .map(e => e.Output ?? '') + // Go output prepends indentation to help group tests - remove it + .map(o => o.replace(/^ /, '')); + // First and last lines will be generic "test started" and "test finished" lines - remove them + outputEvents.splice(0, 1); + outputEvents.splice(-1, 1); + const details = outputEvents.join(''); + error = { + message: details, + details: details + }; + } + group.tests.push(new test_results_1.TestCaseResult(testName, result, time, error)); + } + return new test_results_1.TestRunResult(path, suites); + } +} +exports.GolangJsonParser = GolangJsonParser; + + +/***/ }), + +/***/ 8342: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -832,29 +1202,41 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.JavaJunitParser = void 0; -const path = __importStar(__nccwpck_require__(5622)); -const xml2js_1 = __nccwpck_require__(6189); -const path_utils_1 = __nccwpck_require__(4070); -const test_results_1 = __nccwpck_require__(2768); +const path = __importStar(__nccwpck_require__(6928)); +const xml2js_1 = __nccwpck_require__(758); +const java_stack_trace_element_parser_1 = __nccwpck_require__(8105); +const path_utils_1 = __nccwpck_require__(9132); +const test_results_1 = __nccwpck_require__(613); class JavaJunitParser { + options; + trackedFiles; constructor(options) { - var _a; this.options = options; // Map to efficient lookup of all paths with given file name this.trackedFiles = {}; for (const filePath of options.trackedFiles) { const fileName = path.basename(filePath); - const files = (_a = this.trackedFiles[fileName]) !== null && _a !== void 0 ? _a : (this.trackedFiles[fileName] = []); - files.push(path_utils_1.normalizeFilePath(filePath)); + const files = this.trackedFiles[fileName] ?? (this.trackedFiles[fileName] = []); + files.push((0, path_utils_1.normalizeFilePath)(filePath)); } } async parse(filePath, content) { @@ -881,7 +1263,7 @@ class JavaJunitParser { } async getJunitReport(filePath, content) { try { - return await xml2js_1.parseStringPromise(content); + return await (0, xml2js_1.parseStringPromise)(content); } catch (e) { throw new Error(`Invalid XML at ${filePath}\n\n${e}`); @@ -896,7 +1278,8 @@ class JavaJunitParser { const sr = new test_results_1.TestSuiteResult(name, this.getGroups(ts), time); return sr; }); - const time = parseFloat(junit.testsuites.$.time) * 1000; + const seconds = parseFloat(junit.testsuites.$?.time); + const time = isNaN(seconds) ? undefined : seconds * 1000; return new test_results_1.TestRunResult(filePath, suites, time); } getGroups(suite) { @@ -928,39 +1311,52 @@ class JavaJunitParser { }); } getTestCaseResult(test) { - if (test.failure) + if (test.failure || test.error) return 'failed'; if (test.skipped) return 'skipped'; return 'success'; } getTestCaseError(tc) { - if (!this.options.parseErrors || !tc.failure) { + if (!this.options.parseErrors) { return undefined; } - const failure = tc.failure[0]; - const details = failure._; + // We process and the same way + const failures = tc.failure ?? tc.error; + if (!failures) { + return undefined; + } + const failure = failures[0]; + const details = typeof failure === 'object' ? failure._ : failure; let filePath; let line; - const src = this.exceptionThrowSource(details); - if (src) { - filePath = src.filePath; - line = src.line; + if (details != null) { + const src = this.exceptionThrowSource(details); + if (src) { + filePath = src.filePath; + line = src.line; + } + } + let message; + if (typeof failure === 'object') { + message = failure.$.message; + if (failure.$?.type) { + message = failure.$.type + ': ' + message; + } } return { path: filePath, line, details, - message: failure.message + message }; } exceptionThrowSource(stackTrace) { const lines = stackTrace.split(/\r?\n/); - const re = /^at (.*)\((.*):(\d+)\)$/; for (const str of lines) { - const match = str.match(re); - if (match !== null) { - const [_, tracePath, fileName, lineStr] = match; + const stackTraceElement = (0, java_stack_trace_element_parser_1.parseStackTraceElement)(str); + if (stackTraceElement) { + const { tracePath, fileName, lineStr } = stackTraceElement; const filePath = this.getFilePath(tracePath, fileName); if (filePath !== undefined) { const line = parseInt(lineStr); @@ -1015,18 +1411,62 @@ exports.JavaJunitParser = JavaJunitParser; /***/ }), -/***/ 1113: +/***/ 8105: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseStackTraceElement = parseStackTraceElement; +// classloader and module name are optional: +// at //(:) +// https://github.com/eclipse-openj9/openj9/issues/11452#issuecomment-754946992 +const re = /^\s*at (\S+\/\S*\/)?(.*)\((.*):(\d+)\)$/; +function parseStackTraceElement(stackTraceLine) { + const match = stackTraceLine.match(re); + if (match !== null) { + const [_, maybeClassLoaderAndModuleNameAndVersion, tracePath, fileName, lineStr] = match; + const { classLoader, moduleNameAndVersion } = parseClassLoaderAndModule(maybeClassLoaderAndModuleNameAndVersion); + return { + classLoader, + moduleNameAndVersion, + tracePath, + fileName, + lineStr + }; + } + return undefined; +} +function parseClassLoaderAndModule(maybeClassLoaderAndModuleNameAndVersion) { + if (maybeClassLoaderAndModuleNameAndVersion) { + const res = maybeClassLoaderAndModuleNameAndVersion.split('/'); + const classLoader = res[0]; + let moduleNameAndVersion = res[1]; + if (moduleNameAndVersion === '') { + moduleNameAndVersion = undefined; + } + return { classLoader, moduleNameAndVersion }; + } + return { classLoader: undefined, moduleNameAndVersion: undefined }; +} + + +/***/ }), + +/***/ 1042: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.JestJunitParser = void 0; -const xml2js_1 = __nccwpck_require__(6189); -const node_utils_1 = __nccwpck_require__(5824); -const path_utils_1 = __nccwpck_require__(4070); -const test_results_1 = __nccwpck_require__(2768); +const xml2js_1 = __nccwpck_require__(758); +const node_utils_1 = __nccwpck_require__(5384); +const path_utils_1 = __nccwpck_require__(9132); +const test_results_1 = __nccwpck_require__(613); class JestJunitParser { + options; + assumedWorkDir; constructor(options) { this.options = options; } @@ -1036,7 +1476,7 @@ class JestJunitParser { } async getJunitReport(path, content) { try { - return (await xml2js_1.parseStringPromise(content)); + return (await (0, xml2js_1.parseStringPromise)(content)); } catch (e) { throw new Error(`Invalid XML at ${path}\n\n${e}`); @@ -1046,15 +1486,18 @@ class JestJunitParser { const suites = junit.testsuites.testsuite === undefined ? [] : junit.testsuites.testsuite.map(ts => { - const name = ts.$.name.trim(); + const name = this.escapeCharacters(ts.$.name.trim()); const time = parseFloat(ts.$.time) * 1000; const sr = new test_results_1.TestSuiteResult(name, this.getGroups(ts), time); return sr; }); - const time = parseFloat(junit.testsuites.$.time) * 1000; + const time = junit.testsuites.$ && parseFloat(junit.testsuites.$.time) * 1000; return new test_results_1.TestRunResult(path, suites, time); } getGroups(suite) { + if (!suite.testcase) { + return []; + } const groups = []; for (const tc of suite.testcase) { let grp = groups.find(g => g.describe === tc.$.classname); @@ -1086,10 +1529,10 @@ class JestJunitParser { if (!this.options.parseErrors || !tc.failure) { return undefined; } - const details = tc.failure[0]; + const details = typeof tc.failure[0] === 'string' ? tc.failure[0] : tc.failure[0]['_']; let path; let line; - const src = node_utils_1.getExceptionSource(details, this.options.trackedFiles, file => this.getRelativePath(file)); + const src = (0, node_utils_1.getExceptionSource)(details, this.options.trackedFiles, file => this.getRelativePath(file)); if (src) { path = src.path; line = src.line; @@ -1101,7 +1544,7 @@ class JestJunitParser { }; } getRelativePath(path) { - path = path_utils_1.normalizeFilePath(path); + path = (0, path_utils_1.normalizeFilePath)(path); const workDir = this.getWorkDir(path); if (workDir !== undefined && path.startsWith(workDir)) { path = path.substr(workDir.length); @@ -1109,8 +1552,12 @@ class JestJunitParser { return path; } getWorkDir(path) { - var _a, _b; - return ((_b = (_a = this.options.workDir) !== null && _a !== void 0 ? _a : this.assumedWorkDir) !== null && _b !== void 0 ? _b : (this.assumedWorkDir = path_utils_1.getBasePath(path, this.options.trackedFiles))); + return (this.options.workDir ?? + this.assumedWorkDir ?? + (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles))); + } + escapeCharacters(s) { + return s.replace(/([<>])/g, '\\$1'); } } exports.JestJunitParser = JestJunitParser; @@ -1118,17 +1565,19 @@ exports.JestJunitParser = JestJunitParser; /***/ }), -/***/ 6043: +/***/ 5402: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MochaJsonParser = void 0; -const test_results_1 = __nccwpck_require__(2768); -const node_utils_1 = __nccwpck_require__(5824); -const path_utils_1 = __nccwpck_require__(4070); +const test_results_1 = __nccwpck_require__(613); +const node_utils_1 = __nccwpck_require__(5384); +const path_utils_1 = __nccwpck_require__(9132); class MochaJsonParser { + options; + assumedWorkDir; constructor(options) { this.options = options; } @@ -1149,9 +1598,8 @@ class MochaJsonParser { getTestRunResult(resultsPath, mocha) { const suitesMap = {}; const getSuite = (test) => { - var _a; const path = this.getRelativePath(test.file); - return (_a = suitesMap[path]) !== null && _a !== void 0 ? _a : (suitesMap[path] = new test_results_1.TestSuiteResult(path, [])); + return suitesMap[path] ?? (suitesMap[path] = new test_results_1.TestSuiteResult(path, [])); }; for (const test of mocha.passes) { const suite = getSuite(test); @@ -1169,7 +1617,6 @@ class MochaJsonParser { return new test_results_1.TestRunResult(resultsPath, suites, mocha.stats.duration); } processTest(suite, test, result) { - var _a; const groupName = test.fullTitle !== test.title ? test.fullTitle.substr(0, test.fullTitle.length - test.title.length).trimEnd() : null; @@ -1179,7 +1626,7 @@ class MochaJsonParser { suite.groups.push(group); } const error = this.getTestCaseError(test); - const testCase = new test_results_1.TestCaseResult(test.title, result, (_a = test.duration) !== null && _a !== void 0 ? _a : 0, error); + const testCase = new test_results_1.TestCaseResult(test.title, result, test.duration ?? 0, error); group.tests.push(testCase); } getTestCaseError(test) { @@ -1190,7 +1637,7 @@ class MochaJsonParser { } let path; let line; - const src = node_utils_1.getExceptionSource(details, this.options.trackedFiles, file => this.getRelativePath(file)); + const src = (0, node_utils_1.getExceptionSource)(details, this.options.trackedFiles, file => this.getRelativePath(file)); if (src) { path = src.path; line = src.line; @@ -1203,7 +1650,7 @@ class MochaJsonParser { }; } getRelativePath(path) { - path = path_utils_1.normalizeFilePath(path); + path = (0, path_utils_1.normalizeFilePath)(path); const workDir = this.getWorkDir(path); if (workDir !== undefined && path.startsWith(workDir)) { path = path.substr(workDir.length); @@ -1211,8 +1658,9 @@ class MochaJsonParser { return path; } getWorkDir(path) { - var _a, _b; - return ((_b = (_a = this.options.workDir) !== null && _a !== void 0 ? _a : this.assumedWorkDir) !== null && _b !== void 0 ? _b : (this.assumedWorkDir = path_utils_1.getBasePath(path, this.options.trackedFiles))); + return (this.options.workDir ?? + this.assumedWorkDir ?? + (this.assumedWorkDir = (0, path_utils_1.getBasePath)(path, this.options.trackedFiles))); } } exports.MochaJsonParser = MochaJsonParser; @@ -1220,17 +1668,159 @@ exports.MochaJsonParser = MochaJsonParser; /***/ }), -/***/ 5867: +/***/ 6578: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAnnotations = void 0; -const markdown_utils_1 = __nccwpck_require__(6482); -const parse_utils_1 = __nccwpck_require__(7811); +exports.PythonXunitParser = void 0; +const java_junit_parser_1 = __nccwpck_require__(8342); +class PythonXunitParser extends java_junit_parser_1.JavaJunitParser { + options; + constructor(options) { + super(options); + this.options = options; + } +} +exports.PythonXunitParser = PythonXunitParser; + + +/***/ }), + +/***/ 9768: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RspecJsonParser = void 0; +const test_results_1 = __nccwpck_require__(613); +class RspecJsonParser { + options; + assumedWorkDir; + constructor(options) { + this.options = options; + } + async parse(path, content) { + const mocha = this.getRspecJson(path, content); + const result = this.getTestRunResult(path, mocha); + result.sort(true); + return Promise.resolve(result); + } + getRspecJson(path, content) { + try { + return JSON.parse(content); + } + catch (e) { + throw new Error(`Invalid JSON at ${path}\n\n${e}`); + } + } + getTestRunResult(resultsPath, rspec) { + const suitesMap = {}; + const getSuite = (test) => { + const path = test.file_path; + return suitesMap[path] ?? (suitesMap[path] = new test_results_1.TestSuiteResult(path, [])); + }; + for (const test of rspec.examples) { + const suite = getSuite(test); + if (test.status === 'failed') { + this.processTest(suite, test, 'failed'); + } + else if (test.status === 'passed') { + this.processTest(suite, test, 'success'); + } + else if (test.status === 'pending') { + this.processTest(suite, test, 'skipped'); + } + } + const suites = Object.values(suitesMap); + return new test_results_1.TestRunResult(resultsPath, suites, rspec.summary.duration); + } + processTest(suite, test, result) { + const groupName = test.full_description !== test.description + ? test.full_description.substr(0, test.full_description.length - test.description.length).trimEnd() + : null; + let group = suite.groups.find(grp => grp.name === groupName); + if (group === undefined) { + group = new test_results_1.TestGroupResult(groupName, []); + suite.groups.push(group); + } + const error = this.getTestCaseError(test); + const testCase = new test_results_1.TestCaseResult(test.full_description, result, test.run_time ?? 0, error); + group.tests.push(testCase); + } + getTestCaseError(test) { + const backtrace = test.exception?.backtrace; + const message = test.exception?.message; + if (backtrace === undefined) { + return undefined; + } + let path; + let line; + const details = backtrace.join('\n'); + const src = this.getExceptionSource(backtrace); + if (src) { + path = src.path; + line = src.line; + } + return { + path, + line, + message, + details + }; + } + getExceptionSource(backtrace) { + const re = /^(.*?):(\d+):/; + for (const str of backtrace) { + const match = str.match(re); + if (match !== null) { + const [_, path, lineStr] = match; + if (path.startsWith('./')) { + const line = parseInt(lineStr); + return { path, line }; + } + } + } + return undefined; + } +} +exports.RspecJsonParser = RspecJsonParser; + + +/***/ }), + +/***/ 7330: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SwiftXunitParser = void 0; +const java_junit_parser_1 = __nccwpck_require__(8342); +class SwiftXunitParser extends java_junit_parser_1.JavaJunitParser { + options; + constructor(options) { + super(options); + this.options = options; + } +} +exports.SwiftXunitParser = SwiftXunitParser; + + +/***/ }), + +/***/ 4400: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAnnotations = getAnnotations; +const markdown_utils_1 = __nccwpck_require__(5129); +const parse_utils_1 = __nccwpck_require__(9633); function getAnnotations(results, maxCount) { - var _a, _b, _c, _d; if (maxCount === 0) { return []; } @@ -1246,8 +1836,8 @@ function getAnnotations(results, maxCount) { if (err === undefined) { continue; } - const path = (_a = err.path) !== null && _a !== void 0 ? _a : tr.path; - const line = (_b = err.line) !== null && _b !== void 0 ? _b : 0; + const path = err.path ?? tr.path; + const line = err.line ?? 0; if (mergeDup) { const dup = errors.find(e => path === e.path && line === e.line && err.details === e.details); if (dup !== undefined) { @@ -1260,7 +1850,7 @@ function getAnnotations(results, maxCount) { suiteName: ts.name, testName: tg.name ? `${tg.name} ► ${tc.name}` : tc.name, details: err.details, - message: (_d = (_c = err.message) !== null && _c !== void 0 ? _c : parse_utils_1.getFirstNonEmptyLine(err.details)) !== null && _d !== void 0 ? _d : 'Test failed', + message: err.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(err.details) ?? 'Test failed', path, line }); @@ -1275,7 +1865,7 @@ function getAnnotations(results, maxCount) { 'Failed test found in:', e.testRunPaths.map(p => ` ${p}`).join('\n'), 'Error:', - ident(markdown_utils_1.fixEol(e.message), ' ') + ident((0, markdown_utils_1.fixEol)(e.message), ' ') ].join('\n'); return enforceCheckRunLimits({ path: e.path, @@ -1283,18 +1873,17 @@ function getAnnotations(results, maxCount) { end_line: e.line, annotation_level: 'failure', title: `${e.suiteName} ► ${e.testName}`, - raw_details: markdown_utils_1.fixEol(e.details), + raw_details: (0, markdown_utils_1.fixEol)(e.details), message }); }); return annotations; } -exports.getAnnotations = getAnnotations; function enforceCheckRunLimits(err) { - err.title = markdown_utils_1.ellipsis(err.title || '', 255); - err.message = markdown_utils_1.ellipsis(err.message, 65535); + err.title = (0, markdown_utils_1.ellipsis)(err.title || '', 255); + err.message = (0, markdown_utils_1.ellipsis)(err.message, 65535); if (err.raw_details) { - err.raw_details = markdown_utils_1.ellipsis(err.raw_details, 65535); + err.raw_details = (0, markdown_utils_1.ellipsis)(err.raw_details, 65535); } return err; } @@ -1308,14 +1897,18 @@ function ident(text, prefix) { /***/ }), -/***/ 3737: +/***/ 7070: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -1325,52 +1918,72 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getReport = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const markdown_utils_1 = __nccwpck_require__(6482); -const parse_utils_1 = __nccwpck_require__(7811); -const slugger_1 = __nccwpck_require__(3328); +exports.DEFAULT_OPTIONS = void 0; +exports.getReport = getReport; +exports.getBadge = getBadge; +const core = __importStar(__nccwpck_require__(7484)); +const markdown_utils_1 = __nccwpck_require__(5129); +const node_utils_1 = __nccwpck_require__(5384); +const parse_utils_1 = __nccwpck_require__(9633); +const slugger_1 = __nccwpck_require__(9537); const MAX_REPORT_LENGTH = 65535; -const defaultOptions = { +const MAX_ACTIONS_SUMMARY_LENGTH = 1048576; +exports.DEFAULT_OPTIONS = { listSuites: 'all', listTests: 'all', - baseUrl: '' + baseUrl: '', + onlySummary: false, + useActionsSummary: true, + badgeTitle: 'tests', + reportTitle: '', + collapsed: 'auto' }; -function getReport(results, options = defaultOptions) { - core.info('Generating check run summary'); +function getReport(results, options = exports.DEFAULT_OPTIONS, shortSummary = '') { applySort(results); const opts = { ...options }; - let lines = renderReport(results, opts); + let lines = renderReport(results, opts, shortSummary); let report = lines.join('\n'); - if (getByteLength(report) <= MAX_REPORT_LENGTH) { + if (getByteLength(report) <= getMaxReportLength(options)) { return report; } if (opts.listTests === 'all') { core.info("Test report summary is too big - setting 'listTests' to 'failed'"); opts.listTests = 'failed'; - lines = renderReport(results, opts); + lines = renderReport(results, opts, shortSummary); report = lines.join('\n'); - if (getByteLength(report) <= MAX_REPORT_LENGTH) { + if (getByteLength(report) <= getMaxReportLength(options)) { return report; } } - core.warning(`Test report summary exceeded limit of ${MAX_REPORT_LENGTH} bytes and will be trimmed`); - return trimReport(lines); + core.warning(`Test report summary exceeded limit of ${getMaxReportLength(options)} bytes and will be trimmed`); + return trimReport(lines, options); } -exports.getReport = getReport; -function trimReport(lines) { +function getMaxReportLength(options = exports.DEFAULT_OPTIONS) { + return options.useActionsSummary ? MAX_ACTIONS_SUMMARY_LENGTH : MAX_REPORT_LENGTH; +} +function trimReport(lines, options) { const closingBlock = '```'; - const errorMsg = `**Report exceeded GitHub limit of ${MAX_REPORT_LENGTH} bytes and has been trimmed**`; + const errorMsg = `**Report exceeded GitHub limit of ${getMaxReportLength(options)} bytes and has been trimmed**`; const maxErrorMsgLength = closingBlock.length + errorMsg.length + 2; - const maxReportLength = MAX_REPORT_LENGTH - maxErrorMsgLength; + const maxReportLength = getMaxReportLength(options) - maxErrorMsgLength; let reportLength = 0; let codeBlock = false; let endLineIndex = 0; @@ -1393,29 +2006,36 @@ function trimReport(lines) { return reportLines.join('\n'); } function applySort(results) { - results.sort((a, b) => a.path.localeCompare(b.path)); + results.sort((a, b) => a.path.localeCompare(b.path, node_utils_1.DEFAULT_LOCALE)); for (const res of results) { - res.suites.sort((a, b) => a.name.localeCompare(b.name)); + res.suites.sort((a, b) => a.name.localeCompare(b.name, node_utils_1.DEFAULT_LOCALE)); } } function getByteLength(text) { return Buffer.byteLength(text, 'utf8'); } -function renderReport(results, options) { +function renderReport(results, options, shortSummary) { const sections = []; - const badge = getReportBadge(results); + const reportTitle = options.reportTitle.trim(); + if (reportTitle) { + sections.push(`# ${reportTitle}`); + } + if (shortSummary) { + sections.push(`## ${shortSummary}`); + } + const badge = getReportBadge(results, options); sections.push(badge); const runs = getTestRunsReport(results, options); sections.push(...runs); return sections; } -function getReportBadge(results) { +function getReportBadge(results, options) { const passed = results.reduce((sum, tr) => sum + tr.passed, 0); const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0); const failed = results.reduce((sum, tr) => sum + tr.failed, 0); - return getBadge(passed, failed, skipped); + return getBadge(passed, failed, skipped, options); } -function getBadge(passed, failed, skipped) { +function getBadge(passed, failed, skipped, options) { const text = []; if (passed > 0) { text.push(`${passed} passed`); @@ -1435,54 +2055,73 @@ function getBadge(passed, failed, skipped) { color = 'yellow'; } const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully'; - const uri = encodeURIComponent(`tests-${message}-${color}`); - return `![${hint}](https://img.shields.io/badge/${uri})`; + const encodedBadgeTitle = encodeImgShieldsURIComponent(options.badgeTitle); + const encodedMessage = encodeImgShieldsURIComponent(message); + const encodedColor = encodeImgShieldsURIComponent(color); + return `![${hint}](https://img.shields.io/badge/${encodedBadgeTitle}-${encodedMessage}-${encodedColor})`; } function getTestRunsReport(testRuns, options) { const sections = []; - if (testRuns.length > 1) { - const tableData = testRuns.map((tr, runIndex) => { - const time = markdown_utils_1.formatTime(tr.time); + const totalFailed = testRuns.reduce((sum, tr) => sum + tr.failed, 0); + // Determine if report should be collapsed based on collapsed option + const shouldCollapse = options.collapsed === 'always' || (options.collapsed === 'auto' && totalFailed === 0); + if (shouldCollapse) { + sections.push(`
Expand for details`); + sections.push(` `); + } + if (testRuns.length > 0 || options.onlySummary) { + const tableData = testRuns + .map((tr, originalIndex) => ({ tr, originalIndex })) + .filter(({ tr }) => tr.passed > 0 || tr.failed > 0 || tr.skipped > 0) + .map(({ tr, originalIndex }) => { + const time = (0, markdown_utils_1.formatTime)(tr.time); const name = tr.path; - const addr = options.baseUrl + makeRunSlug(runIndex).link; - const nameLink = markdown_utils_1.link(name, addr); - const passed = tr.passed > 0 ? `${tr.passed}${markdown_utils_1.Icon.success}` : ''; - const failed = tr.failed > 0 ? `${tr.failed}${markdown_utils_1.Icon.fail}` : ''; - const skipped = tr.skipped > 0 ? `${tr.skipped}${markdown_utils_1.Icon.skip}` : ''; + const addr = options.baseUrl + makeRunSlug(originalIndex, options).link; + const nameLink = (0, markdown_utils_1.link)(name, addr); + const passed = tr.passed > 0 ? `${tr.passed} ${markdown_utils_1.Icon.success}` : ''; + const failed = tr.failed > 0 ? `${tr.failed} ${markdown_utils_1.Icon.fail}` : ''; + const skipped = tr.skipped > 0 ? `${tr.skipped} ${markdown_utils_1.Icon.skip}` : ''; return [nameLink, passed, failed, skipped, time]; }); - const resultsTable = markdown_utils_1.table(['Report', 'Passed', 'Failed', 'Skipped', 'Time'], [markdown_utils_1.Align.Left, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right], ...tableData); + const resultsTable = (0, markdown_utils_1.table)(['Report', 'Passed', 'Failed', 'Skipped', 'Time'], [markdown_utils_1.Align.Left, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right], ...tableData); sections.push(resultsTable); } - const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat(); - sections.push(...suitesReports); + if (options.onlySummary === false) { + const suitesReports = testRuns.map((tr, i) => getSuitesReport(tr, i, options)).flat(); + sections.push(...suitesReports); + } + if (shouldCollapse) { + sections.push(`
`); + } return sections; } function getSuitesReport(tr, runIndex, options) { const sections = []; - const trSlug = makeRunSlug(runIndex); - const nameLink = `${tr.path}`; - const icon = getResultIcon(tr.result); - sections.push(`## ${icon}\xa0${nameLink}`); - const time = markdown_utils_1.formatTime(tr.time); - const headingLine2 = tr.tests > 0 - ? `**${tr.tests}** tests were completed in **${time}** with **${tr.passed}** passed, **${tr.failed}** failed and **${tr.skipped}** skipped.` - : 'No tests found'; - sections.push(headingLine2); const suites = options.listSuites === 'failed' ? tr.failedSuites : tr.suites; - if (suites.length > 0) { - const suitesTable = markdown_utils_1.table(['Test suite', 'Passed', 'Failed', 'Skipped', 'Time'], [markdown_utils_1.Align.Left, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right], ...suites.map((s, suiteIndex) => { - const tsTime = markdown_utils_1.formatTime(s.time); - const tsName = s.name; - const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed'); - const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex).link; - const tsNameLink = skipLink ? tsName : markdown_utils_1.link(tsName, tsAddr); - const passed = s.passed > 0 ? `${s.passed}${markdown_utils_1.Icon.success}` : ''; - const failed = s.failed > 0 ? `${s.failed}${markdown_utils_1.Icon.fail}` : ''; - const skipped = s.skipped > 0 ? `${s.skipped}${markdown_utils_1.Icon.skip}` : ''; - return [tsNameLink, passed, failed, skipped, tsTime]; - })); - sections.push(suitesTable); + if (options.listSuites !== 'none') { + const trSlug = makeRunSlug(runIndex, options); + const nameLink = `${tr.path}`; + const icon = getResultIcon(tr.result); + sections.push(`## ${icon}\xa0${nameLink}`); + const time = (0, markdown_utils_1.formatTime)(tr.time); + const headingLine2 = tr.tests > 0 + ? `**${tr.tests}** tests were completed in **${time}** with **${tr.passed}** passed, **${tr.failed}** failed and **${tr.skipped}** skipped.` + : 'No tests found'; + sections.push(headingLine2); + if (suites.length > 0) { + const suitesTable = (0, markdown_utils_1.table)(['Test suite', 'Passed', 'Failed', 'Skipped', 'Time'], [markdown_utils_1.Align.Left, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right, markdown_utils_1.Align.Right], ...suites.map((s, suiteIndex) => { + const tsTime = (0, markdown_utils_1.formatTime)(s.time); + const tsName = s.name; + const skipLink = options.listTests === 'none' || (options.listTests === 'failed' && s.result !== 'failed'); + const tsAddr = options.baseUrl + makeSuiteSlug(runIndex, suiteIndex, options).link; + const tsNameLink = skipLink ? tsName : (0, markdown_utils_1.link)(tsName, tsAddr); + const passed = s.passed > 0 ? `${s.passed} ${markdown_utils_1.Icon.success}` : ''; + const failed = s.failed > 0 ? `${s.failed} ${markdown_utils_1.Icon.fail}` : ''; + const skipped = s.skipped > 0 ? `${s.skipped} ${markdown_utils_1.Icon.skip}` : ''; + return [tsNameLink, passed, failed, skipped, tsTime]; + })); + sections.push(suitesTable); + } } if (options.listTests !== 'none') { const tests = suites.map((ts, suiteIndex) => getTestsReport(ts, runIndex, suiteIndex, options)).flat(); @@ -1493,7 +2132,6 @@ function getSuitesReport(tr, runIndex, options) { return sections; } function getTestsReport(ts, runIndex, suiteIndex, options) { - var _a, _b, _c; if (options.listTests === 'failed' && ts.result !== 'failed') { return []; } @@ -1503,7 +2141,7 @@ function getTestsReport(ts, runIndex, suiteIndex, options) { } const sections = []; const tsName = ts.name; - const tsSlug = makeSuiteSlug(runIndex, suiteIndex); + const tsSlug = makeSuiteSlug(runIndex, suiteIndex, options); const tsNameLink = `${tsName}`; const icon = getResultIcon(ts.result); sections.push(`### ${icon}\xa0${tsNameLink}`); @@ -1514,10 +2152,15 @@ function getTestsReport(ts, runIndex, suiteIndex, options) { } const space = grp.name ? ' ' : ''; for (const tc of grp.tests) { + if (options.listTests === 'failed' && tc.result !== 'failed') { + continue; + } const result = getResultIcon(tc.result); sections.push(`${space}${result} ${tc.name}`); if (tc.error) { - const lines = (_c = ((_a = tc.error.message) !== null && _a !== void 0 ? _a : (_b = parse_utils_1.getFirstNonEmptyLine(tc.error.details)) === null || _b === void 0 ? void 0 : _b.trim())) === null || _c === void 0 ? void 0 : _c.split(/\r?\n/g).map(l => '\t' + l); + const lines = (tc.error.message ?? (0, parse_utils_1.getFirstNonEmptyLine)(tc.error.details)?.trim()) + ?.split(/\r?\n/g) + .map(l => '\t' + l); if (lines) { sections.push(...lines); } @@ -1527,13 +2170,13 @@ function getTestsReport(ts, runIndex, suiteIndex, options) { sections.push('```'); return sections; } -function makeRunSlug(runIndex) { +function makeRunSlug(runIndex, options) { // use prefix to avoid slug conflicts after escaping the paths - return slugger_1.slug(`r${runIndex}`); + return (0, slugger_1.slug)(`r${runIndex}`, options); } -function makeSuiteSlug(runIndex, suiteIndex) { +function makeSuiteSlug(runIndex, suiteIndex, options) { // use prefix to avoid slug conflicts after escaping the paths - return slugger_1.slug(`r${runIndex}s${suiteIndex}`); + return (0, slugger_1.slug)(`r${runIndex}s${suiteIndex}`, options); } function getResultIcon(result) { switch (result) { @@ -1547,18 +2190,25 @@ function getResultIcon(result) { return ''; } } +function encodeImgShieldsURIComponent(component) { + return encodeURIComponent(component).replace(/-/g, '--').replace(/_/g, '__'); +} /***/ }), -/***/ 2768: -/***/ ((__unused_webpack_module, exports) => { +/***/ 613: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TestCaseResult = exports.TestGroupResult = exports.TestSuiteResult = exports.TestRunResult = void 0; +const node_utils_1 = __nccwpck_require__(5384); class TestRunResult { + path; + suites; + totalTime; constructor(path, suites, totalTime) { this.path = path; this.suites = suites; @@ -1577,8 +2227,7 @@ class TestRunResult { return this.suites.reduce((sum, g) => sum + g.skipped, 0); } get time() { - var _a; - return (_a = this.totalTime) !== null && _a !== void 0 ? _a : this.suites.reduce((sum, g) => sum + g.time, 0); + return this.totalTime ?? this.suites.reduce((sum, g) => sum + g.time, 0); } get result() { return this.suites.some(t => t.result === 'failed') ? 'failed' : 'success'; @@ -1587,7 +2236,7 @@ class TestRunResult { return this.suites.filter(s => s.result === 'failed'); } sort(deep) { - this.suites.sort((a, b) => a.name.localeCompare(b.name)); + this.suites.sort((a, b) => a.name.localeCompare(b.name, node_utils_1.DEFAULT_LOCALE)); if (deep) { for (const suite of this.suites) { suite.sort(deep); @@ -1597,6 +2246,9 @@ class TestRunResult { } exports.TestRunResult = TestRunResult; class TestSuiteResult { + name; + groups; + totalTime; constructor(name, groups, totalTime) { this.name = name; this.groups = groups; @@ -1615,8 +2267,7 @@ class TestSuiteResult { return this.groups.reduce((sum, g) => sum + g.skipped, 0); } get time() { - var _a; - return (_a = this.totalTime) !== null && _a !== void 0 ? _a : this.groups.reduce((sum, g) => sum + g.time, 0); + return this.totalTime ?? this.groups.reduce((sum, g) => sum + g.time, 0); } get result() { return this.groups.some(t => t.result === 'failed') ? 'failed' : 'success'; @@ -1625,7 +2276,7 @@ class TestSuiteResult { return this.groups.filter(grp => grp.result === 'failed'); } sort(deep) { - this.groups.sort((a, b) => { var _a, _b; return ((_a = a.name) !== null && _a !== void 0 ? _a : '').localeCompare((_b = b.name) !== null && _b !== void 0 ? _b : ''); }); + this.groups.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '', node_utils_1.DEFAULT_LOCALE)); if (deep) { for (const grp of this.groups) { grp.sort(); @@ -1635,6 +2286,8 @@ class TestSuiteResult { } exports.TestSuiteResult = TestSuiteResult; class TestGroupResult { + name; + tests; constructor(name, tests) { this.name = name; this.tests = tests; @@ -1658,11 +2311,15 @@ class TestGroupResult { return this.tests.filter(tc => tc.result === 'failed'); } sort() { - this.tests.sort((a, b) => a.name.localeCompare(b.name)); + this.tests.sort((a, b) => a.name.localeCompare(b.name, node_utils_1.DEFAULT_LOCALE)); } } exports.TestGroupResult = TestGroupResult; class TestCaseResult { + name; + result; + time; + error; constructor(name, result, time, error) { this.name = name; this.result = result; @@ -1675,39 +2332,18 @@ exports.TestCaseResult = TestCaseResult; /***/ }), -/***/ 6069: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const exec_1 = __nccwpck_require__(1514); -// Wraps original exec() function -// Returns exit code and whole stdout/stderr -async function exec(commandLine, args, options) { - options = options || {}; - let stdout = ''; - let stderr = ''; - options.listeners = { - stdout: (data) => (stdout += data.toString()), - stderr: (data) => (stderr += data.toString()) - }; - const code = await exec_1.exec(commandLine, args, options); - return { code, stdout, stderr }; -} -exports.default = exec; - - -/***/ }), - -/***/ 9844: +/***/ 5454: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -1717,25 +2353,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.listFiles = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const exec_1 = __importDefault(__nccwpck_require__(6069)); +exports.listFiles = listFiles; +const core = __importStar(__nccwpck_require__(7484)); +const exec_1 = __nccwpck_require__(5236); async function listFiles() { core.startGroup('Listing all files tracked by git'); let output = ''; try { - output = (await exec_1.default('git', ['ls-files', '-z'])).stdout; + output = (await (0, exec_1.getExecOutput)('git', ['ls-files', '-z'])).stdout; } finally { fixStdOutNullTermination(); @@ -1743,7 +2386,6 @@ async function listFiles() { } return output.split('\u0000').filter(s => s.length > 0); } -exports.listFiles = listFiles; function fixStdOutNullTermination() { // Previous command uses NULL as delimiters and output is printed to stdout. // We have to make sure next thing written to stdout will start on new line. @@ -1754,14 +2396,18 @@ function fixStdOutNullTermination() { /***/ }), -/***/ 3522: +/***/ 6667: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -1771,25 +2417,37 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.listFiles = exports.downloadArtifact = exports.getCheckRunContext = void 0; -const fs_1 = __nccwpck_require__(5747); -const core = __importStar(__nccwpck_require__(2186)); -const github = __importStar(__nccwpck_require__(5438)); -const stream = __importStar(__nccwpck_require__(2413)); -const util_1 = __nccwpck_require__(1669); -const got_1 = __importDefault(__nccwpck_require__(3061)); -const asyncStream = util_1.promisify(stream.pipeline); +exports.getCheckRunContext = getCheckRunContext; +exports.downloadArtifact = downloadArtifact; +exports.listFiles = listFiles; +const fs_1 = __nccwpck_require__(9896); +const core = __importStar(__nccwpck_require__(7484)); +const github = __importStar(__nccwpck_require__(3228)); +const stream = __importStar(__nccwpck_require__(2203)); +const util_1 = __nccwpck_require__(9023); +const got_1 = __importDefault(__nccwpck_require__(6757)); +const asyncStream = (0, util_1.promisify)(stream.pipeline); function getCheckRunContext() { if (github.context.eventName === 'workflow_run') { core.info('Action was triggered by workflow_run: using SHA and RUN_ID from triggering workflow'); @@ -1810,12 +2468,11 @@ function getCheckRunContext() { } return { sha: github.context.sha, runId }; } -exports.getCheckRunContext = getCheckRunContext; async function downloadArtifact(octokit, artifactId, fileName, token) { core.startGroup(`Downloading artifact ${fileName}`); try { core.info(`Artifact ID: ${artifactId}`); - const req = octokit.actions.downloadArtifact.endpoint({ + const req = octokit.rest.actions.downloadArtifact.endpoint({ ...github.context.repo, artifact_id: artifactId, archive_format: 'zip' @@ -1823,28 +2480,13 @@ async function downloadArtifact(octokit, artifactId, fileName, token) { const headers = { Authorization: `Bearer ${token}` }; - const resp = await got_1.default(req.url, { - headers, - followRedirect: false + const downloadStream = got_1.default.stream(req.url, { headers }); + const fileWriterStream = (0, fs_1.createWriteStream)(fileName); + downloadStream.on('redirect', (response) => { + core.info(`Downloading ${response.headers.location}`); }); - core.info(`Fetch artifact URL: ${resp.statusCode} ${resp.statusMessage}`); - if (resp.statusCode !== 302) { - throw new Error('Fetch artifact URL failed: received unexpected status code'); - } - const url = resp.headers.location; - if (url === undefined) { - const receivedHeaders = Object.keys(resp.headers); - core.info(`Received headers: ${receivedHeaders.join(', ')}`); - throw new Error('Location header was not found in API response'); - } - if (typeof url !== 'string') { - throw new Error(`Location header has unexpected value: ${url}`); - } - const downloadStream = got_1.default.stream(url, { headers }); - const fileWriterStream = fs_1.createWriteStream(fileName); - core.info(`Downloading ${url}`); - downloadStream.on('downloadProgress', ({ transferred }) => { - core.info(`Progress: ${transferred} B`); + downloadStream.on('downloadProgress', (progress) => { + core.info(`Progress: ${progress.transferred} B`); }); await asyncStream(downloadStream, fileWriterStream); } @@ -1852,11 +2494,10 @@ async function downloadArtifact(octokit, artifactId, fileName, token) { core.endGroup(); } } -exports.downloadArtifact = downloadArtifact; async function listFiles(octokit, sha) { core.startGroup('Fetching list of tracked files from GitHub'); try { - const commit = await octokit.git.getCommit({ + const commit = await octokit.rest.git.getCommit({ commit_sha: sha, ...github.context.repo }); @@ -1867,19 +2508,18 @@ async function listFiles(octokit, sha) { core.endGroup(); } } -exports.listFiles = listFiles; async function listGitTree(octokit, sha, path) { const pathLog = path ? ` at ${path}` : ''; core.info(`Fetching tree ${sha}${pathLog}`); let truncated = false; - let tree = await octokit.git.getTree({ + let tree = await octokit.rest.git.getTree({ recursive: 'true', tree_sha: sha, ...github.context.repo }); if (tree.data.truncated) { truncated = true; - tree = await octokit.git.getTree({ + tree = await octokit.rest.git.getTree({ tree_sha: sha, ...github.context.repo }); @@ -1901,71 +2541,72 @@ async function listGitTree(octokit, sha, path) { /***/ }), -/***/ 6482: +/***/ 5129: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.formatTime = exports.ellipsis = exports.fixEol = exports.tableEscape = exports.table = exports.link = exports.Icon = exports.Align = void 0; +exports.Icon = exports.Align = void 0; +exports.link = link; +exports.table = table; +exports.tableEscape = tableEscape; +exports.fixEol = fixEol; +exports.ellipsis = ellipsis; +exports.formatTime = formatTime; var Align; (function (Align) { Align["Left"] = ":---"; Align["Center"] = ":---:"; Align["Right"] = "---:"; Align["None"] = "---"; -})(Align = exports.Align || (exports.Align = {})); +})(Align || (exports.Align = Align = {})); exports.Icon = { - skip: '✖️', - success: '✔️', + skip: '⚪', // ':white_circle:' + success: '✅', // ':white_check_mark:' fail: '❌' // ':x:' }; function link(title, address) { return `[${title}](${address})`; } -exports.link = link; function table(headers, align, ...rows) { const headerRow = `|${headers.map(tableEscape).join('|')}|`; const alignRow = `|${align.join('|')}|`; const contentRows = rows.map(row => `|${row.map(tableEscape).join('|')}|`).join('\n'); return [headerRow, alignRow, contentRows].join('\n'); } -exports.table = table; function tableEscape(content) { return content.toString().replace('|', '\\|'); } -exports.tableEscape = tableEscape; function fixEol(text) { - var _a; - return (_a = text === null || text === void 0 ? void 0 : text.replace(/\r/g, '')) !== null && _a !== void 0 ? _a : ''; + return text?.replace(/\r/g, '') ?? ''; } -exports.fixEol = fixEol; function ellipsis(text, maxLength) { if (text.length <= maxLength) { return text; } return text.substr(0, maxLength - 3) + '...'; } -exports.ellipsis = ellipsis; function formatTime(ms) { if (ms > 1000) { return `${Math.round(ms / 1000)}s`; } return `${Math.round(ms)}ms`; } -exports.formatTime = formatTime; /***/ }), -/***/ 5824: +/***/ 5384: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getExceptionSource = void 0; -const path_utils_1 = __nccwpck_require__(4070); +exports.DEFAULT_LOCALE = void 0; +exports.getExceptionSource = getExceptionSource; +const path_utils_1 = __nccwpck_require__(9132); +exports.DEFAULT_LOCALE = 'en-US'; function getExceptionSource(stackTrace, trackedFiles, getRelativePath) { const lines = stackTrace.split(/\r?\n/); const re = /\((.*):(\d+):\d+\)$/; @@ -1973,7 +2614,7 @@ function getExceptionSource(stackTrace, trackedFiles, getRelativePath) { const match = str.match(re); if (match !== null) { const [_, fileStr, lineStr] = match; - const filePath = path_utils_1.normalizeFilePath(fileStr); + const filePath = (0, path_utils_1.normalizeFilePath)(fileStr); if (filePath.startsWith('internal/') || filePath.includes('/node_modules/')) { continue; } @@ -1988,18 +2629,19 @@ function getExceptionSource(stackTrace, trackedFiles, getRelativePath) { } } } -exports.getExceptionSource = getExceptionSource; /***/ }), -/***/ 7811: +/***/ 9633: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getFirstNonEmptyLine = exports.parseIsoDate = exports.parseNetDuration = void 0; +exports.parseNetDuration = parseNetDuration; +exports.parseIsoDate = parseIsoDate; +exports.getFirstNonEmptyLine = getFirstNonEmptyLine; function parseNetDuration(str) { const durationRe = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)$/; const durationMatch = str.match(durationRe); @@ -2009,7 +2651,6 @@ function parseNetDuration(str) { const [_, hourStr, minStr, secStr] = durationMatch; return (parseInt(hourStr) * 3600 + parseInt(minStr) * 60 + parseFloat(secStr)) * 1000; } -exports.parseNetDuration = parseNetDuration; function parseIsoDate(str) { const isoDateRe = /^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)$/; if (str === undefined || !isoDateRe.test(str)) { @@ -2017,23 +2658,23 @@ function parseIsoDate(str) { } return new Date(str); } -exports.parseIsoDate = parseIsoDate; function getFirstNonEmptyLine(stackTrace) { - const lines = stackTrace.split(/\r?\n/g); - return lines.find(str => !/^\s*$/.test(str)); + const lines = stackTrace?.split(/\r?\n/g); + return lines?.find(str => !/^\s*$/.test(str)); } -exports.getFirstNonEmptyLine = getFirstNonEmptyLine; /***/ }), -/***/ 4070: +/***/ 9132: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBasePath = exports.normalizeFilePath = exports.normalizeDirPath = void 0; +exports.normalizeDirPath = normalizeDirPath; +exports.normalizeFilePath = normalizeFilePath; +exports.getBasePath = getBasePath; function normalizeDirPath(path, addTrailingSlash) { if (!path) { return path; @@ -2044,14 +2685,12 @@ function normalizeDirPath(path, addTrailingSlash) { } return path; } -exports.normalizeDirPath = normalizeDirPath; function normalizeFilePath(path) { if (!path) { return path; } return path.trim().replace(/\\/g, '/'); } -exports.normalizeFilePath = normalizeFilePath; function getBasePath(path, trackedFiles) { if (trackedFiles.includes(path)) { return ''; @@ -2068,51 +2707,64 @@ function getBasePath(path, trackedFiles) { const base = path.substr(0, path.length - max.length); return base; } -exports.getBasePath = getBasePath; /***/ }), -/***/ 3328: +/***/ 9537: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.slug = void 0; -// Returns HTML element id and href link usable as manual anchor links -// This is needed because Github in check run summary doesn't automatically -// create links out of headings as it normally does for other markdown content -function slug(name) { +exports.slug = slug; +function slug(name, options) { const slugId = name .trim() .replace(/_/g, '') .replace(/[./\\]/g, '-') .replace(/[^\w-]/g, ''); const id = `user-content-${slugId}`; - const link = `#${slugId}`; + // When using the Action Summary for display, links must include the "user-content-" prefix. + const link = options.useActionsSummary ? `#${id}` : `#${slugId}`; return { id, link }; } -exports.slug = slug; /***/ }), -/***/ 7351: +/***/ 4914: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const os = __importStar(__nccwpck_require__(2087)); -const utils_1 = __nccwpck_require__(5278); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); /** * Commands * @@ -2167,13 +2819,13 @@ class Command { } } function escapeData(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A'); } function escapeProperty(s) { - return utils_1.toCommandValue(s) + return (0, utils_1.toCommandValue)(s) .replace(/%/g, '%25') .replace(/\r/g, '%0D') .replace(/\n/g, '%0A') @@ -2184,11 +2836,34 @@ function escapeProperty(s) { /***/ }), -/***/ 2186: +/***/ 7484: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -2198,19 +2873,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -const command_1 = __nccwpck_require__(7351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2087)); -const path = __importStar(__nccwpck_require__(5622)); +exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = __nccwpck_require__(4914); +const file_command_1 = __nccwpck_require__(4753); +const utils_1 = __nccwpck_require__(302); +const os = __importStar(__nccwpck_require__(857)); +const path = __importStar(__nccwpck_require__(6928)); +const oidc_utils_1 = __nccwpck_require__(5306); /** * The code to exit an action */ @@ -2224,7 +2894,7 @@ var ExitCode; * A code indicating that the action was a failure */ ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +})(ExitCode || (exports.ExitCode = ExitCode = {})); //----------------------------------------------------------------------- // Variables //----------------------------------------------------------------------- @@ -2235,17 +2905,13 @@ var ExitCode; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); + const convertedVal = (0, utils_1.toCommandValue)(val); process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - const delimiter = '_GitHubActionsFileCommandDelimeter_'; - const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; - file_command_1.issueCommand('ENV', commandValue); - } - else { - command_1.issueCommand('set-env', { name }, convertedVal); + return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); } + (0, command_1.issueCommand)('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -2253,7 +2919,7 @@ exports.exportVariable = exportVariable; * @param secret value of the secret */ function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); + (0, command_1.issueCommand)('add-mask', {}, secret); } exports.setSecret = setSecret; /** @@ -2263,16 +2929,18 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueCommand('PATH', inputPath); + (0, file_command_1.issueFileCommand)('PATH', inputPath); } else { - command_1.issueCommand('add-path', {}, inputPath); + (0, command_1.issueCommand)('add-path', {}, inputPath); } process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; } exports.addPath = addPath; /** - * Gets the value of an input. The value is also trimmed. + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. * * @param name name of the input to get * @param options optional. See InputOptions. @@ -2283,9 +2951,52 @@ function getInput(name, options) { if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } + if (options && options.trimWhitespace === false) { + return val; + } return val.trim(); } exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; /** * Sets the value of an output. * @@ -2294,7 +3005,12 @@ exports.getInput = getInput; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os.EOL); + (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); } exports.setOutput = setOutput; /** @@ -2303,7 +3019,7 @@ exports.setOutput = setOutput; * */ function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); + (0, command_1.issue)('echo', enabled ? 'on' : 'off'); } exports.setCommandEcho = setCommandEcho; //----------------------------------------------------------------------- @@ -2334,25 +3050,36 @@ exports.isDebug = isDebug; * @param message debug message */ function debug(message) { - command_1.issueCommand('debug', {}, message); + (0, command_1.issueCommand)('debug', {}, message); } exports.debug = debug; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function error(message) { - command_1.issue('error', message instanceof Error ? message.toString() : message); +function error(message, properties = {}) { + (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function warning(message) { - command_1.issue('warning', message instanceof Error ? message.toString() : message); +function warning(message, properties = {}) { + (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; /** * Writes info to log with console.log. * @param message info message @@ -2369,14 +3096,14 @@ exports.info = info; * @param name The name of the output group */ function startGroup(name) { - command_1.issue('group', name); + (0, command_1.issue)('group', name); } exports.startGroup = startGroup; /** * End an output group. */ function endGroup() { - command_1.issue('endgroup'); + (0, command_1.issue)('endgroup'); } exports.endGroup = endGroup; /** @@ -2412,7 +3139,11 @@ exports.group = group; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); } exports.saveState = saveState; /** @@ -2425,30 +3156,75 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = __nccwpck_require__(1847); +Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); +/** + * @deprecated use core.summary + */ +var summary_2 = __nccwpck_require__(1847); +Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); +/** + * Path exports + */ +var path_utils_1 = __nccwpck_require__(1976); +Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); +Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); +Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); +/** + * Platform utilities exports + */ +exports.platform = __importStar(__nccwpck_require__(8968)); //# sourceMappingURL=core.js.map /***/ }), -/***/ 717: +/***/ 4753: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; // For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(5747)); -const os = __importStar(__nccwpck_require__(2087)); -const utils_1 = __nccwpck_require__(5278); -function issueCommand(command, message) { +const crypto = __importStar(__nccwpck_require__(6982)); +const fs = __importStar(__nccwpck_require__(9896)); +const os = __importStar(__nccwpck_require__(857)); +const utils_1 = __nccwpck_require__(302); +function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); @@ -2456,16 +3232,575 @@ function issueCommand(command, message) { if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { encoding: 'utf8' }); } -exports.issueCommand = issueCommand; +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; //# sourceMappingURL=file-command.js.map /***/ }), -/***/ 5278: +/***/ 5306: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.OidcClient = void 0; +const http_client_1 = __nccwpck_require__(4844); +const auth_1 = __nccwpck_require__(4552); +const core_1 = __nccwpck_require__(7484); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map + +/***/ }), + +/***/ 1976: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(__nccwpck_require__(6928)); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map + +/***/ }), + +/***/ 8968: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; +const os_1 = __importDefault(__nccwpck_require__(857)); +const exec = __importStar(__nccwpck_require__(5236)); +const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; +}); +const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a, _b, _c, _d; + const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { + silent: true + }); + const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; + return { + name, + version + }; +}); +const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { + silent: true + }); + const [name, version] = stdout.trim().split('\n'); + return { + name, + version + }; +}); +exports.platform = os_1.default.platform(); +exports.arch = os_1.default.arch(); +exports.isWindows = exports.platform === 'win32'; +exports.isMacOS = exports.platform === 'darwin'; +exports.isLinux = exports.platform === 'linux'; +function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, (yield (exports.isWindows + ? getWindowsInfo() + : exports.isMacOS + ? getMacOsInfo() + : getLinuxInfo()))), { platform: exports.platform, + arch: exports.arch, + isWindows: exports.isWindows, + isMacOS: exports.isMacOS, + isLinux: exports.isLinux }); + }); +} +exports.getDetails = getDetails; +//# sourceMappingURL=platform.js.map + +/***/ }), + +/***/ 1847: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = __nccwpck_require__(857); +const fs_1 = __nccwpck_require__(9896); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map + +/***/ }), + +/***/ 302: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -2473,6 +3808,7 @@ exports.issueCommand = issueCommand; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toCommandProperties = exports.toCommandValue = void 0; /** * Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string @@ -2487,15 +3823,54 @@ function toCommandValue(input) { return JSON.stringify(input); } exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; //# sourceMappingURL=utils.js.map /***/ }), -/***/ 1514: +/***/ 5236: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -2505,15 +3880,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -const tr = __importStar(__nccwpck_require__(8159)); +exports.getExecOutput = exports.exec = void 0; +const string_decoder_1 = __nccwpck_require__(3193); +const tr = __importStar(__nccwpck_require__(6665)); /** * Exec a command. * Output will be streamed to the live console. @@ -2538,15 +3908,79 @@ function exec(commandLine, args, options) { }); } exports.exec = exec; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ''; + let stderr = ''; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); + const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + //flush any remaining characters + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); +} +exports.getExecOutput = getExecOutput; //# sourceMappingURL=exec.js.map /***/ }), -/***/ 8159: +/***/ 6665: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -2556,20 +3990,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -const os = __importStar(__nccwpck_require__(2087)); -const events = __importStar(__nccwpck_require__(8614)); -const child = __importStar(__nccwpck_require__(3129)); -const path = __importStar(__nccwpck_require__(5622)); -const io = __importStar(__nccwpck_require__(7436)); -const ioUtil = __importStar(__nccwpck_require__(1962)); +exports.argStringToArray = exports.ToolRunner = void 0; +const os = __importStar(__nccwpck_require__(857)); +const events = __importStar(__nccwpck_require__(4434)); +const child = __importStar(__nccwpck_require__(5317)); +const path = __importStar(__nccwpck_require__(6928)); +const io = __importStar(__nccwpck_require__(4994)); +const ioUtil = __importStar(__nccwpck_require__(5207)); +const timers_1 = __nccwpck_require__(3557); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -2639,11 +4068,12 @@ class ToolRunner extends events.EventEmitter { s = s.substring(n + os.EOL.length); n = s.indexOf(os.EOL); } - strBuffer = s; + return s; } catch (err) { // streaming lines to console is best effort. Don't fail a build. this._debug(`error processing line. Failed with error ${err}`); + return ''; } } _getSpawnFileName() { @@ -2925,7 +4355,7 @@ class ToolRunner extends events.EventEmitter { // if the tool is only a file name, then resolve it from the PATH // otherwise verify it exists (add extension on Windows if necessary) this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug('arguments:'); for (const arg of this.args) { @@ -2939,9 +4369,12 @@ class ToolRunner extends events.EventEmitter { state.on('debug', (message) => { this._debug(message); }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } const fileName = this._getSpawnFileName(); const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - const stdbuffer = ''; + let stdbuffer = ''; if (cp.stdout) { cp.stdout.on('data', (data) => { if (this.options.listeners && this.options.listeners.stdout) { @@ -2950,14 +4383,14 @@ class ToolRunner extends events.EventEmitter { if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } - this._processLineBuffer(data, stdbuffer, (line) => { + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } - const errbuffer = ''; + let errbuffer = ''; if (cp.stderr) { cp.stderr.on('data', (data) => { state.processStderr = true; @@ -2972,7 +4405,7 @@ class ToolRunner extends events.EventEmitter { : optionsNonNull.outStream; s.write(data); } - this._processLineBuffer(data, errbuffer, (line) => { + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } @@ -3019,7 +4452,7 @@ class ToolRunner extends events.EventEmitter { } cp.stdin.end(this.options.input); } - }); + })); }); } } @@ -3105,7 +4538,7 @@ class ExecState extends events.EventEmitter { this._setResult(); } else if (this.processExited) { - this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); + this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); } } _debug(message) { @@ -3149,24 +4582,25 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 4087: +/***/ 1648: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Context = void 0; -const fs_1 = __nccwpck_require__(5747); -const os_1 = __nccwpck_require__(2087); +const fs_1 = __nccwpck_require__(9896); +const os_1 = __nccwpck_require__(857); class Context { /** * Hydrate the context from the environment */ constructor() { + var _a, _b, _c; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { - if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); } else { const path = process.env.GITHUB_EVENT_PATH; @@ -3180,8 +4614,13 @@ class Context { this.action = process.env.GITHUB_ACTION; this.actor = process.env.GITHUB_ACTOR; this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = + (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; } get issue() { const payload = this.payload; @@ -3206,14 +4645,18 @@ exports.Context = Context; /***/ }), -/***/ 5438: +/***/ 3228: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -3226,14 +4669,14 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOctokit = exports.context = void 0; -const Context = __importStar(__nccwpck_require__(4087)); -const utils_1 = __nccwpck_require__(3030); +const Context = __importStar(__nccwpck_require__(1648)); +const utils_1 = __nccwpck_require__(8006); exports.context = new Context.Context(); /** * Returns a hydrated octokit ready to use for GitHub Actions @@ -3241,22 +4684,27 @@ exports.context = new Context.Context(); * @param token the repo PAT or GITHUB_TOKEN * @param options other options to set */ -function getOctokit(token, options) { - return new utils_1.GitHub(utils_1.getOctokitOptions(token, options)); +function getOctokit(token, options, ...additionalPlugins) { + const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); + return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); } exports.getOctokit = getOctokit; //# sourceMappingURL=github.js.map /***/ }), -/***/ 7914: +/***/ 5156: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -3269,13 +4717,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; -const httpClient = __importStar(__nccwpck_require__(9925)); +exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; +const httpClient = __importStar(__nccwpck_require__(4844)); +const undici_1 = __nccwpck_require__(6752); function getAuthString(token, options) { if (!token && !options.auth) { throw new Error('Parameter token or opts.auth is required'); @@ -3291,6 +4749,19 @@ function getProxyAgent(destinationUrl) { return hc.getAgent(destinationUrl); } exports.getProxyAgent = getProxyAgent; +function getProxyAgentDispatcher(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgentDispatcher(destinationUrl); +} +exports.getProxyAgentDispatcher = getProxyAgentDispatcher; +function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + }); + return proxyFetch; +} +exports.getProxyFetch = getProxyFetch; function getApiBaseUrl() { return process.env['GITHUB_API_URL'] || 'https://api.github.com'; } @@ -3299,14 +4770,18 @@ exports.getApiBaseUrl = getApiBaseUrl; /***/ }), -/***/ 3030: +/***/ 8006: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -3319,27 +4794,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOctokitOptions = exports.GitHub = exports.context = void 0; -const Context = __importStar(__nccwpck_require__(4087)); -const Utils = __importStar(__nccwpck_require__(7914)); +exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; +const Context = __importStar(__nccwpck_require__(1648)); +const Utils = __importStar(__nccwpck_require__(5156)); // octokit + plugins -const core_1 = __nccwpck_require__(6762); -const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044); -const plugin_paginate_rest_1 = __nccwpck_require__(4193); +const core_1 = __nccwpck_require__(1897); +const plugin_rest_endpoint_methods_1 = __nccwpck_require__(4935); +const plugin_paginate_rest_1 = __nccwpck_require__(8082); exports.context = new Context.Context(); const baseUrl = Utils.getApiBaseUrl(); -const defaults = { +exports.defaults = { baseUrl, request: { - agent: Utils.getProxyAgent(baseUrl) + agent: Utils.getProxyAgent(baseUrl), + fetch: Utils.getProxyFetch(baseUrl) } }; -exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults); +exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); /** * Convience function to correctly format Octokit Options to pass into the constructor. * @@ -3360,16 +4836,139 @@ exports.getOctokitOptions = getOctokitOptions; /***/ }), -/***/ 9925: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4552: +/***/ (function(__unused_webpack_module, exports) { "use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -const http = __nccwpck_require__(8605); -const https = __nccwpck_require__(7211); -const pm = __nccwpck_require__(6443); -let tunnel; +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map + +/***/ }), + +/***/ 4844: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(__nccwpck_require__(8611)); +const https = __importStar(__nccwpck_require__(5692)); +const pm = __importStar(__nccwpck_require__(4988)); +const tunnel = __importStar(__nccwpck_require__(770)); +const undici_1 = __nccwpck_require__(6752); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -3399,22 +4998,22 @@ var HttpCodes; HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); var Headers; (function (Headers) { Headers["Accept"] = "accept"; Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); +})(Headers || (exports.Headers = Headers = {})); var MediaTypes; (function (MediaTypes) { MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +})(MediaTypes || (exports.MediaTypes = MediaTypes = {})); /** * Returns the proxy URL, depending upon the supplied url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com */ function getProxyUrl(serverUrl) { - let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ''; } exports.getProxyUrl = getProxyUrl; @@ -3447,20 +5046,35 @@ class HttpClientResponse { this.message = message; } readBody() { - return new Promise(async (resolve, reject) => { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on('data', (chunk) => { + chunks.push(chunk); + }); + this.message.on('end', () => { + resolve(Buffer.concat(chunks)); + }); + })); }); } } exports.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { - let parsedUrl = new URL(requestUrl); + const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === 'https:'; } exports.isHttps = isHttps; @@ -3503,141 +5117,169 @@ class HttpClient { } } options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); } get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); } del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); } post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); } patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); } put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); } head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); } sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); } /** * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ - async getJson(requestUrl, additionalHeaders = {}) { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - let res = await this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); } - async postJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); } - async putJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); } - async patchJson(requestUrl, obj, additionalHeaders = {}) { - let data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - let res = await this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); } /** * Makes a raw http request. * All other methods such as get, post, patch, and request ultimately call this. * Prefer get, del, post and patch */ - async request(verb, requestUrl, data, headers) { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - let parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1 - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - response = await this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol == 'https:' && - parsedUrl.protocol != parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - await response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (let header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; } } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = await this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - await response.readBody(); - await this._performExponentialBackoff(numTries); - } - } - return response; + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); } /** * Needs to be called if keepAlive is set to true in request options. @@ -3654,14 +5296,22 @@ class HttpClient { * @param data */ requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); + this.requestRawWithCallback(info, data, callbackForResult); + }); }); } /** @@ -3671,21 +5321,24 @@ class HttpClient { * @param onResult */ requestRawWithCallback(info, data, onResult) { - let socket; if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); } let callbackCalled = false; - let handleResult = (err, res) => { + function handleResult(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); }); + let socket; req.on('socket', sock => { socket = sock; }); @@ -3694,12 +5347,12 @@ class HttpClient { if (socket) { socket.end(); } - handleResult(new Error('Request timeout: ' + info.options.path), null); + handleResult(new Error(`Request timeout: ${info.options.path}`)); }); req.on('error', function (err) { // err has statusCode property // res should have headers - handleResult(err, null); + handleResult(err); }); if (data && typeof data === 'string') { req.write(data, 'utf8'); @@ -3720,9 +5373,18 @@ class HttpClient { * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com */ getAgent(serverUrl) { - let parsedUrl = new URL(serverUrl); + const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } _prepareRequest(method, requestUrl, headers) { const info = {}; info.parsedUrl = requestUrl; @@ -3744,21 +5406,19 @@ class HttpClient { info.options.agent = this._getAgent(info.parsedUrl); // gives handlers an opportunity to participate if (this.handlers) { - this.handlers.forEach(handler => { + for (const handler of this.handlers) { handler.prepareRequest(info.options); - }); + } } return info; } _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); } return lowercaseKeys(headers || {}); } _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; @@ -3767,8 +5427,8 @@ class HttpClient { } _getAgent(parsedUrl) { let agent; - let proxyUrl = pm.getProxyUrl(parsedUrl); - let useProxy = proxyUrl && proxyUrl.hostname; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; if (this._keepAlive && useProxy) { agent = this._proxyAgent; } @@ -3776,27 +5436,22 @@ class HttpClient { agent = this._agent; } // if agent is already assigned use that agent. - if (!!agent) { + if (agent) { return agent; } const usingSsl = parsedUrl.protocol === 'https:'; let maxSockets = 100; - if (!!this.requestOptions) { + if (this.requestOptions) { maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = __nccwpck_require__(4294); - } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { const agentOptions = { - maxSockets: maxSockets, + maxSockets, keepAlive: this._keepAlive, - proxy: { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`, - host: proxyUrl.hostname, - port: proxyUrl.port - } + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) }; let tunnelAgent; const overHttps = proxyUrl.protocol === 'https:'; @@ -3811,7 +5466,7 @@ class HttpClient { } // if reusing agent across request and tunneling agent isn't assigned create a new agent if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } @@ -3829,110 +5484,152 @@ class HttpClient { } return agent; } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } - static dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - let a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; } - return value; + // if agent is already assigned use that agent. + if (proxyAgent) { + return proxyAgent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && { + token: `${proxyUrl.username}:${proxyUrl.password}` + }))); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; } - async _processResponse(res, options) { - return new Promise(async (resolve, reject) => { - const statusCode = res.message.statusCode; - const response = { - statusCode: statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode == HttpCodes.NotFound) { - resolve(response); - } - let obj; - let contents; - // get the result from the body - try { - contents = await res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; } else { - obj = JSON.parse(contents); + msg = `Failed request: (${statusCode})`; } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); } else { - msg = 'Failed request: (' + statusCode + ')'; + resolve(response); } - let err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } + })); }); } } exports.HttpClient = HttpClient; - +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map /***/ }), -/***/ 6443: +/***/ 4988: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkBypass = exports.getProxyUrl = void 0; function getProxyUrl(reqUrl) { - let usingSsl = reqUrl.protocol === 'https:'; - let proxyUrl; + const usingSsl = reqUrl.protocol === 'https:'; if (checkBypass(reqUrl)) { - return proxyUrl; + return undefined; } - let proxyVar; - if (usingSsl) { - proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + try { + return new URL(proxyVar); + } + catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) + return new URL(`http://${proxyVar}`); + } } else { - proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; + return undefined; } - if (proxyVar) { - proxyUrl = new URL(proxyVar); - } - return proxyUrl; } exports.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } - let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; if (!noProxy) { return false; } @@ -3948,31 +5645,61 @@ function checkBypass(reqUrl) { reqPort = 443; } // Format the request hostname and hostname with port - let upperReqHosts = [reqUrl.hostname.toUpperCase()]; + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; if (typeof reqPort === 'number') { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } // Compare request host against noproxy - for (let upperNoProxyItem of noProxy + for (const upperNoProxyItem of noProxy .split(',') .map(x => x.trim().toUpperCase()) .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { return true; } } return false; } exports.checkBypass = checkBypass; - +function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return (hostLower === 'localhost' || + hostLower.startsWith('127.') || + hostLower.startsWith('[::1]') || + hostLower.startsWith('[0:0:0:0:0:0:0:1]')); +} +//# sourceMappingURL=proxy.js.map /***/ }), -/***/ 1962: +/***/ 5207: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -3984,11 +5711,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; var _a; Object.defineProperty(exports, "__esModule", ({ value: true })); -const assert_1 = __nccwpck_require__(2357); -const fs = __nccwpck_require__(5747); -const path = __nccwpck_require__(5622); -_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; +exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; +const fs = __importStar(__nccwpck_require__(9896)); +const path = __importStar(__nccwpck_require__(6928)); +_a = fs.promises +// export const {open} = 'fs' +, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; +// export const {open} = 'fs' exports.IS_WINDOWS = process.platform === 'win32'; +// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 +exports.UV_FS_O_EXLOCK = 0x10000000; +exports.READONLY = fs.constants.O_RDONLY; function exists(fsPath) { return __awaiter(this, void 0, void 0, function* () { try { @@ -4027,49 +5760,6 @@ function isRooted(p) { return p.startsWith('/'); } exports.isRooted = isRooted; -/** - * Recursively create a directory at `fsPath`. - * - * This implementation is optimistic, meaning it attempts to create the full - * path first, and backs up the path stack from there. - * - * @param fsPath The path to create - * @param maxDepth The maximum recursion depth - * @param depth The current recursion depth - */ -function mkdirP(fsPath, maxDepth = 1000, depth = 1) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - fsPath = path.resolve(fsPath); - if (depth >= maxDepth) - return exports.mkdir(fsPath); - try { - yield exports.mkdir(fsPath); - return; - } - catch (err) { - switch (err.code) { - case 'ENOENT': { - yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1); - yield exports.mkdir(fsPath); - return; - } - default: { - let stats; - try { - stats = yield exports.stat(fsPath); - } - catch (err2) { - throw err; - } - if (!stats.isDirectory()) - throw err; - } - } - } - }); -} -exports.mkdirP = mkdirP; /** * Best effort attempt to determine whether a file exists and is executable. * @param filePath file path to check @@ -4166,15 +5856,40 @@ function isUnixExecutable(stats) { ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || ((stats.mode & 64) > 0 && stats.uid === process.getuid())); } +// Get the path of cmd.exe in windows +function getCmdPath() { + var _a; + return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; +} +exports.getCmdPath = getCmdPath; //# sourceMappingURL=io-util.js.map /***/ }), -/***/ 7436: +/***/ 4994: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -4185,11 +5900,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const childProcess = __nccwpck_require__(3129); -const path = __nccwpck_require__(5622); -const util_1 = __nccwpck_require__(1669); -const ioUtil = __nccwpck_require__(1962); -const exec = util_1.promisify(childProcess.exec); +exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; +const assert_1 = __nccwpck_require__(2613); +const path = __importStar(__nccwpck_require__(6928)); +const ioUtil = __importStar(__nccwpck_require__(5207)); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -4200,14 +5914,14 @@ const exec = util_1.promisify(childProcess.exec); */ function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { - const { force, recursive } = readCopyOptions(options); + const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; // Dest is an existing file, but not forcing if (destStat && destStat.isFile() && !force) { return; } // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { @@ -4270,51 +5984,23 @@ exports.mv = mv; function rmRF(inputPath) { return __awaiter(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { - // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another - // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. - try { - if (yield ioUtil.isDirectory(inputPath, true)) { - yield exec(`rd /s /q "${inputPath}"`); - } - else { - yield exec(`del /f /a "${inputPath}"`); - } - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - } - // Shelling out fails to remove a symlink folder with missing source, this unlink catches that - try { - yield ioUtil.unlink(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; + // Check for invalid characters + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } } - else { - let isDir = false; - try { - isDir = yield ioUtil.isDirectory(inputPath); - } - catch (err) { - // if you try to delete a file that doesn't exist, desired result is achieved - // other errors are valid - if (err.code !== 'ENOENT') - throw err; - return; - } - if (isDir) { - yield exec(`rm -rf "${inputPath}"`); - } - else { - yield ioUtil.unlink(inputPath); - } + try { + // note if path does not exist, error is silent + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } + catch (err) { + throw new Error(`File was unable to be removed ${err}`); } }); } @@ -4328,7 +6014,8 @@ exports.rmRF = rmRF; */ function mkdirP(fsPath) { return __awaiter(this, void 0, void 0, function* () { - yield ioUtil.mkdirP(fsPath); + assert_1.ok(fsPath, 'a path argument must be provided'); + yield ioUtil.mkdir(fsPath, { recursive: true }); }); } exports.mkdirP = mkdirP; @@ -4356,62 +6043,80 @@ function which(tool, check) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } + return result; } - try { - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { - for (const extension of process.env.PATHEXT.split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return filePath; - } - return ''; - } - // if any path separators, return empty - if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { - return ''; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // return the first match - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); - if (filePath) { - return filePath; - } - } - return ''; - } - catch (err) { - throw new Error(`which failed with message ${err.message}`); + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; } + return ''; }); } exports.which = which; +/** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ +function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // build the list of extensions to try + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { + for (const extension of process.env['PATHEXT'].split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + // if any path separators, return empty + if (tool.includes(path.sep)) { + return []; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the toolkit should strive for consistency + // across platforms. + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + // find all matches + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); +} +exports.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); - return { force, recursive }; + const copySourceDirectory = options.copySourceDirectory == null + ? true + : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter(this, void 0, void 0, function* () { @@ -4467,14 +6172,14 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 3803: +/***/ 2400: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(5747); +const fs = __nccwpck_require__(9896); exports.FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, stat: fs.stat, @@ -4494,7 +6199,7 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/***/ 8838: +/***/ 2479: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4502,8 +6207,11 @@ exports.createFileSystemAdapter = createFileSystemAdapter; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); -const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); -const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); +if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); +} +const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); +const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); const SUPPORTED_MAJOR_VERSION = 10; const SUPPORTED_MINOR_VERSION = 10; const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; @@ -4516,20 +6224,21 @@ exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_B /***/ }), -/***/ 5667: +/***/ 7198: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Settings = exports.scandirSync = exports.scandir = void 0; -const async = __nccwpck_require__(4507); -const sync = __nccwpck_require__(9560); -const settings_1 = __nccwpck_require__(8662); +const async = __nccwpck_require__(7299); +const sync = __nccwpck_require__(7200); +const settings_1 = __nccwpck_require__(2501); exports.Settings = settings_1.default; function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { - return async.read(path, getSettings(), optionsOrSettingsOrCallback); + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } @@ -4549,29 +6258,31 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/***/ 4507: +/***/ 7299: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(109); -const rpl = __nccwpck_require__(5288); -const constants_1 = __nccwpck_require__(8838); -const utils = __nccwpck_require__(6297); -const common = __nccwpck_require__(3847); +const fsStat = __nccwpck_require__(1470); +const rpl = __nccwpck_require__(2743); +const constants_1 = __nccwpck_require__(2479); +const utils = __nccwpck_require__(1144); +const common = __nccwpck_require__(8389); function read(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings, callback); + readdirWithFileTypes(directory, settings, callback); + return; } - return readdir(directory, settings, callback); + readdir(directory, settings, callback); } exports.read = read; function readdirWithFileTypes(directory, settings, callback) { settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { if (readdirError !== null) { - return callFailureCallback(callback, readdirError); + callFailureCallback(callback, readdirError); + return; } const entries = dirents.map((dirent) => ({ dirent, @@ -4579,12 +6290,14 @@ function readdirWithFileTypes(directory, settings, callback) { path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { - return callSuccessCallback(callback, entries); + callSuccessCallback(callback, entries); + return; } const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); rpl(tasks, (rplError, rplEntries) => { if (rplError !== null) { - return callFailureCallback(callback, rplError); + callFailureCallback(callback, rplError); + return; } callSuccessCallback(callback, rplEntries); }); @@ -4594,46 +6307,54 @@ exports.readdirWithFileTypes = readdirWithFileTypes; function makeRplTaskEntry(entry, settings) { return (done) => { if (!entry.dirent.isSymbolicLink()) { - return done(null, entry); + done(null, entry); + return; } settings.fs.stat(entry.path, (statError, stats) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { - return done(statError); + done(statError); + return; } - return done(null, entry); + done(null, entry); + return; } entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - return done(null, entry); + done(null, entry); }); }; } function readdir(directory, settings, callback) { settings.fs.readdir(directory, (readdirError, names) => { if (readdirError !== null) { - return callFailureCallback(callback, readdirError); + callFailureCallback(callback, readdirError); + return; } - const filepaths = names.map((name) => common.joinPathSegments(directory, name, settings.pathSegmentSeparator)); - const tasks = filepaths.map((filepath) => { - return (done) => fsStat.stat(filepath, settings.fsStatSettings, done); + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; }); - rpl(tasks, (rplError, results) => { + rpl(tasks, (rplError, entries) => { if (rplError !== null) { - return callFailureCallback(callback, rplError); + callFailureCallback(callback, rplError); + return; } - const entries = []; - names.forEach((name, index) => { - const stats = results[index]; - const entry = { - name, - path: filepaths[index], - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - entries.push(entry); - }); callSuccessCallback(callback, entries); }); }); @@ -4649,7 +6370,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/***/ 3847: +/***/ 8389: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4670,17 +6391,17 @@ exports.joinPathSegments = joinPathSegments; /***/ }), -/***/ 9560: +/***/ 7200: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; -const fsStat = __nccwpck_require__(109); -const constants_1 = __nccwpck_require__(8838); -const utils = __nccwpck_require__(6297); -const common = __nccwpck_require__(3847); +const fsStat = __nccwpck_require__(1470); +const constants_1 = __nccwpck_require__(2479); +const utils = __nccwpck_require__(1144); +const common = __nccwpck_require__(8389); function read(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); @@ -4732,15 +6453,15 @@ exports.readdir = readdir; /***/ }), -/***/ 8662: +/***/ 2501: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(5622); -const fsStat = __nccwpck_require__(109); -const fs = __nccwpck_require__(3803); +const path = __nccwpck_require__(6928); +const fsStat = __nccwpck_require__(1470); +const fs = __nccwpck_require__(2400); class Settings { constructor(_options = {}) { this._options = _options; @@ -4759,12 +6480,12 @@ class Settings { return option !== null && option !== void 0 ? option : value; } } -exports.default = Settings; +exports["default"] = Settings; /***/ }), -/***/ 883: +/***/ 5497: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4791,27 +6512,27 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/***/ 6297: +/***/ 1144: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fs = void 0; -const fs = __nccwpck_require__(883); +const fs = __nccwpck_require__(5497); exports.fs = fs; /***/ }), -/***/ 2987: +/***/ 4368: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(5747); +const fs = __nccwpck_require__(9896); exports.FILE_SYSTEM_ADAPTER = { lstat: fs.lstat, stat: fs.stat, @@ -4829,20 +6550,21 @@ exports.createFileSystemAdapter = createFileSystemAdapter; /***/ }), -/***/ 109: +/***/ 1470: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.statSync = exports.stat = exports.Settings = void 0; -const async = __nccwpck_require__(4147); -const sync = __nccwpck_require__(4527); -const settings_1 = __nccwpck_require__(2410); +const async = __nccwpck_require__(1539); +const sync = __nccwpck_require__(6544); +const settings_1 = __nccwpck_require__(4853); exports.Settings = settings_1.default; function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { - return async.read(path, getSettings(), optionsOrSettingsOrCallback); + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } @@ -4862,7 +6584,7 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/***/ 4147: +/***/ 1539: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4872,17 +6594,21 @@ exports.read = void 0; function read(path, settings, callback) { settings.fs.lstat(path, (lstatError, lstat) => { if (lstatError !== null) { - return callFailureCallback(callback, lstatError); + callFailureCallback(callback, lstatError); + return; } if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return callSuccessCallback(callback, lstat); + callSuccessCallback(callback, lstat); + return; } settings.fs.stat(path, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { - return callFailureCallback(callback, statError); + callFailureCallback(callback, statError); + return; } - return callSuccessCallback(callback, lstat); + callSuccessCallback(callback, lstat); + return; } if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; @@ -4902,7 +6628,7 @@ function callSuccessCallback(callback, result) { /***/ }), -/***/ 4527: +/***/ 6544: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -4933,13 +6659,13 @@ exports.read = read; /***/ }), -/***/ 2410: +/***/ 4853: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs = __nccwpck_require__(2987); +const fs = __nccwpck_require__(4368); class Settings { constructor(_options = {}) { this._options = _options; @@ -4952,26 +6678,27 @@ class Settings { return option !== null && option !== void 0 ? option : value; } } -exports.default = Settings; +exports["default"] = Settings; /***/ }), -/***/ 6026: +/***/ 9337: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; -const async_1 = __nccwpck_require__(7523); -const stream_1 = __nccwpck_require__(6737); -const sync_1 = __nccwpck_require__(3068); -const settings_1 = __nccwpck_require__(141); +const async_1 = __nccwpck_require__(1936); +const stream_1 = __nccwpck_require__(8986); +const sync_1 = __nccwpck_require__(8769); +const settings_1 = __nccwpck_require__(244); exports.Settings = settings_1.default; function walk(directory, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === 'function') { - return new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; } new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); } @@ -4998,34 +6725,34 @@ function getSettings(settingsOrOptions = {}) { /***/ }), -/***/ 7523: +/***/ 1936: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const async_1 = __nccwpck_require__(5732); +const async_1 = __nccwpck_require__(1906); class AsyncProvider { constructor(_root, _settings) { this._root = _root; this._settings = _settings; this._reader = new async_1.default(this._root, this._settings); - this._storage = new Set(); + this._storage = []; } read(callback) { this._reader.onError((error) => { callFailureCallback(callback, error); }); this._reader.onEntry((entry) => { - this._storage.add(entry); + this._storage.push(entry); }); this._reader.onEnd(() => { - callSuccessCallback(callback, [...this._storage]); + callSuccessCallback(callback, this._storage); }); this._reader.read(); } } -exports.default = AsyncProvider; +exports["default"] = AsyncProvider; function callFailureCallback(callback, error) { callback(error); } @@ -5036,14 +6763,14 @@ function callSuccessCallback(callback, entries) { /***/ }), -/***/ 6737: +/***/ 8986: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2413); -const async_1 = __nccwpck_require__(5732); +const stream_1 = __nccwpck_require__(2203); +const async_1 = __nccwpck_require__(1906); class StreamProvider { constructor(_root, _settings) { this._root = _root; @@ -5073,18 +6800,18 @@ class StreamProvider { return this._stream; } } -exports.default = StreamProvider; +exports["default"] = StreamProvider; /***/ }), -/***/ 3068: +/***/ 8769: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(3595); +const sync_1 = __nccwpck_require__(3431); class SyncProvider { constructor(_root, _settings) { this._root = _root; @@ -5095,22 +6822,22 @@ class SyncProvider { return this._reader.read(); } } -exports.default = SyncProvider; +exports["default"] = SyncProvider; /***/ }), -/***/ 5732: +/***/ 1906: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(8614); -const fsScandir = __nccwpck_require__(5667); -const fastq = __nccwpck_require__(7340); -const common = __nccwpck_require__(7988); -const reader_1 = __nccwpck_require__(8311); +const events_1 = __nccwpck_require__(4434); +const fsScandir = __nccwpck_require__(7198); +const fastq = __nccwpck_require__(8230); +const common = __nccwpck_require__(4449); +const reader_1 = __nccwpck_require__(5903); class AsyncReader extends reader_1.default { constructor(_root, _settings) { super(_root, _settings); @@ -5164,7 +6891,8 @@ class AsyncReader extends reader_1.default { _worker(item, done) { this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { if (error !== null) { - return done(error, undefined); + done(error, undefined); + return; } for (const entry of entries) { this._handleEntry(entry, item.base); @@ -5192,19 +6920,19 @@ class AsyncReader extends reader_1.default { this._emitEntry(entry); } if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, entry.path); + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); } } _emitEntry(entry) { this._emitter.emit('entry', entry); } } -exports.default = AsyncReader; +exports["default"] = AsyncReader; /***/ }), -/***/ 7988: +/***/ 4449: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -5243,13 +6971,13 @@ exports.joinPathSegments = joinPathSegments; /***/ }), -/***/ 8311: +/***/ 5903: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const common = __nccwpck_require__(7988); +const common = __nccwpck_require__(4449); class Reader { constructor(_root, _settings) { this._root = _root; @@ -5257,31 +6985,31 @@ class Reader { this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } } -exports.default = Reader; +exports["default"] = Reader; /***/ }), -/***/ 3595: +/***/ 3431: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsScandir = __nccwpck_require__(5667); -const common = __nccwpck_require__(7988); -const reader_1 = __nccwpck_require__(8311); +const fsScandir = __nccwpck_require__(7198); +const common = __nccwpck_require__(4449); +const reader_1 = __nccwpck_require__(5903); class SyncReader extends reader_1.default { constructor() { super(...arguments); this._scandir = fsScandir.scandirSync; - this._storage = new Set(); + this._storage = []; this._queue = new Set(); } read() { this._pushToQueue(this._root, this._settings.basePath); this._handleQueue(); - return [...this._storage]; + return this._storage; } _pushToQueue(directory, base) { this._queue.add({ directory, base }); @@ -5317,31 +7045,31 @@ class SyncReader extends reader_1.default { this._pushToStorage(entry); } if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, entry.path); + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); } } _pushToStorage(entry) { - this._storage.add(entry); + this._storage.push(entry); } } -exports.default = SyncReader; +exports["default"] = SyncReader; /***/ }), -/***/ 141: +/***/ 244: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(5622); -const fsScandir = __nccwpck_require__(5667); +const path = __nccwpck_require__(6928); +const fsScandir = __nccwpck_require__(7198); class Settings { constructor(_options = {}) { this._options = _options; this.basePath = this._getValue(this._options.basePath, undefined); - this.concurrency = this._getValue(this._options.concurrency, Infinity); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); @@ -5358,448 +7086,476 @@ class Settings { return option !== null && option !== void 0 ? option : value; } } -exports.default = Settings; +exports["default"] = Settings; /***/ }), -/***/ 334: -/***/ ((__unused_webpack_module, exports) => { +/***/ 7864: +/***/ ((module) => { "use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; async function auth(token) { - const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth"; + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; return { type: "token", - token: token, + token, tokenType }; } -/** - * Prefix token for usage in the Authorization header - * - * @param token OAuth token or JSON Web Token - */ +// pkg/dist-src/with-authorization-prefix.js function withAuthorizationPrefix(token) { if (token.split(/\./).length === 3) { return `bearer ${token}`; } - return `token ${token}`; } +// pkg/dist-src/hook.js async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge(route, parameters); + const endpoint = request.endpoint.merge( + route, + parameters + ); endpoint.headers.authorization = withAuthorizationPrefix(token); return request(endpoint); } -const createTokenAuth = function createTokenAuth(token) { +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { if (!token) { throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); } - if (typeof token !== "string") { - throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); } - token = token.replace(/^(token|bearer) +/i, ""); return Object.assign(auth.bind(null, token), { hook: hook.bind(null, token) }); }; - -exports.createTokenAuth = createTokenAuth; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 6762: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 1897: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var universalUserAgent = __nccwpck_require__(5030); -var beforeAfterHook = __nccwpck_require__(3682); -var request = __nccwpck_require__(6234); -var graphql = __nccwpck_require__(8467); -var authToken = __nccwpck_require__(334); - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - return target; -} +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(index_exports); +var import_universal_user_agent = __nccwpck_require__(3843); +var import_before_after_hook = __nccwpck_require__(2732); +var import_request = __nccwpck_require__(8636); +var import_graphql = __nccwpck_require__(7); +var import_auth_token = __nccwpck_require__(7864); -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; +// pkg/dist-src/version.js +var VERSION = "5.2.1"; - var target = _objectWithoutPropertiesLoose(source, excluded); - - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; } - - return target; -} - -const VERSION = "3.2.1"; - -class Octokit { - constructor(options = {}) { - const hook = new beforeAfterHook.Collection(); - const requestDefaults = { - baseUrl: request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; // prepend default user agent with `options.userAgent` if set - - requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" "); - - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - - this.request = request.request.defaults(requestDefaults); - this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults); - this.log = Object.assign({ - debug: () => {}, - info: () => {}, - warn: console.warn.bind(console), - error: console.error.bind(console) - }, options.log); - this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance - // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. - // (2) If only `options.auth` is set, use the default token authentication strategy. - // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. - // TODO: type `options.auth` based on `options.authStrategy`. - - if (!options.authStrategy) { - if (!options.auth) { - // (1) - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - // (2) - const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯ - - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { - authStrategy - } = options, - otherOptions = _objectWithoutProperties(options, ["authStrategy"]); - - const auth = authStrategy(Object.assign({ - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, options.auth)); // @ts-ignore ¯\_(ツ)_/¯ - - hook.wrap("request", auth.hook); - this.auth = auth; - } // apply plugins - // https://stackoverflow.com/a/16345172 - - - const classConstructor = this.constructor; - classConstructor.plugins.forEach(plugin => { - Object.assign(this, plugin(this, options)); - }); - } - static defaults(defaults) { const OctokitWithDefaults = class extends this { constructor(...args) { const options = args[0] || {}; - if (typeof defaults === "function") { super(defaults(options)); return; } - - super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null)); + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); } - }; return OctokitWithDefaults; } + static { + this.plugins = []; + } /** * Attach a plugin (or many) to your Octokit instance. * * @example * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) */ - - static plugin(...newPlugins) { - var _a; - const currentPlugins = this.plugins; - const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a); + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; return NewOctokit; } - -} -Octokit.VERSION = VERSION; -Octokit.plugins = []; - -exports.Octokit = Octokit; -//# sourceMappingURL=index.js.map + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options.log + ); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 9440: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 4471: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); -var isPlainObject = __nccwpck_require__(558); -var universalUserAgent = __nccwpck_require__(5030); +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(3843); +// pkg/dist-src/version.js +var VERSION = "9.0.6"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js function lowercaseKeys(object) { if (!object) { return {}; } - return Object.keys(object).reduce((newObj, key) => { newObj[key.toLowerCase()] = object[key]; return newObj; }, {}); } +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/util/merge-deep.js function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject.isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { - [key]: options[key] - });else result[key] = mergeDeep(defaults[key], options[key]); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); } else { - Object.assign(result, { - [key]: options[key] - }); + Object.assign(result, { [key]: options[key] }); } }); return result; } +// pkg/dist-src/util/remove-undefined-properties.js function removeUndefinedProperties(obj) { for (const key in obj) { - if (obj[key] === undefined) { + if (obj[key] === void 0) { delete obj[key]; } } - return obj; } +// pkg/dist-src/merge.js function merge(defaults, route, options) { if (typeof route === "string") { let [method, url] = route.split(" "); - options = Object.assign(url ? { - method, - url - } : { - url: method - }, options); + options = Object.assign(url ? { method, url } : { url: method }, options); } else { options = Object.assign({}, route); - } // lowercase header names before merging with defaults to avoid duplicates - - - options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging - + } + options.headers = lowercaseKeys(options.headers); removeUndefinedProperties(options); removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); } - - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); return mergedOptions; } +// pkg/dist-src/util/add-query-parameters.js function addQueryParameters(url, parameters) { const separator = /\?/.test(url) ? "&" : "?"; const names = Object.keys(parameters); - if (names.length === 0) { return url; } - - return url + separator + names.map(name => { + return url + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } - return `${name}=${encodeURIComponent(parameters[name])}`; }).join("&"); } -const urlVariableRegex = /\{[^}]+\}/g; - +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^{}}]+\}/g; function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); } +// pkg/dist-src/util/omit.js function omit(object, keysToOmit) { - return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; } -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* istanbul ignore file */ +// pkg/dist-src/util/url-template.js function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } - return part; }).join(""); } - function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } - function encodeValue(operator, value, key) { value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { return encodeUnreserved(key) + "=" + value; } else { return value; } } - function isDefined(value) { - return value !== undefined && value !== null; + return value !== void 0 && value !== null; } - function isKeyOperator(operator) { return operator === ";" || operator === "&" || operator === "?"; } - function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; - + var value = context[key], result = []; if (isDefined(value) && value !== "") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { value = value.toString(); - if (modifier && modifier !== "*") { value = value.substring(0, parseInt(modifier, 10)); } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); } else { if (modifier === "*") { if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); }); } else { - Object.keys(value).forEach(function (k) { + Object.keys(value).forEach(function(k) { if (isDefined(value[k])) { result.push(encodeValue(operator, value[k], k)); } @@ -5807,20 +7563,18 @@ function getValues(context, operator, key, modifier) { } } else { const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); }); } else { - Object.keys(value).forEach(function (k) { + Object.keys(value).forEach(function(k) { if (isDefined(value[k])) { tmp.push(encodeUnreserved(k)); tmp.push(encodeValue(operator, value[k].toString())); } }); } - if (isKeyOperator(operator)) { result.push(encodeUnreserved(key) + "=" + tmp.join(",")); } else if (tmp.length !== 0) { @@ -5839,89 +7593,93 @@ function getValues(context, operator, key, modifier) { result.push(""); } } - return result; } - function parseUrl(template) { return { expand: expand.bind(null, template) }; } - function expand(template, context) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); } - - return (values.length !== 0 ? operator : "") + values.join(separator); } else { - return values.join(","); + return encodeReserved(literal); } - } else { - return encodeReserved(literal); } - }); + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } } +// pkg/dist-src/parse.js function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - + let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; - let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later - + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); const urlVariableNames = extractUrlVariableNames(url); url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { url = options.baseUrl + url; } - - const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); } - - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - - + } if (["GET", "HEAD"].includes(method)) { url = addQueryParameters(url, remainingParameters); } else { @@ -5930,220 +7688,188 @@ function parse(options) { } else { if (Object.keys(remainingParameters).length) { body = remainingParameters; - } else { - headers["content-length"] = 0; } } - } // default content-type for JSON if body is set - - + } if (!headers["content-type"] && typeof body !== "undefined") { headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - - + } if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { body = ""; - } // Only return body/request keys if present - - - return Object.assign({ - method, - url, - headers - }, typeof body !== "undefined" ? { - body - } : null, options.request ? { - request: options.request - } : null); + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } +// pkg/dist-src/endpoint-with-defaults.js function endpointWithDefaults(defaults, route, options) { return parse(merge(defaults, route, options)); } +// pkg/dist-src/with-defaults.js function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), parse }); } -const VERSION = "6.0.9"; +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. -// So we use RequestParameters and add method as additional required property. -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } +/***/ }), + +/***/ 7: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; - -const endpoint = withDefaults(null, DEFAULTS); - -exports.endpoint = endpoint; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 558: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(o) { - return Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (ctor === undefined) return true; - - // If has modified prototype - prot = ctor.prototype; - if (isObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - // Most likely a plain Object - return true; +// pkg/dist-src/index.js +var index_exports = {}; +__export(index_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(index_exports); +var import_request3 = __nccwpck_require__(8636); +var import_universal_user_agent = __nccwpck_require__(3843); + +// pkg/dist-src/version.js +var VERSION = "7.1.1"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(8636); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(8636); + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); } - -exports.isPlainObject = isPlainObject; - - -/***/ }), - -/***/ 8467: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var request = __nccwpck_require__(6234); -var universalUserAgent = __nccwpck_require__(5030); - -const VERSION = "4.5.7"; - -class GraphqlError extends Error { - constructor(request, response) { - const message = response.data.errors[0].message; - super(message); - Object.assign(this, response.data); - Object.assign(this, { - headers: response.headers - }); - this.name = "GraphqlError"; - this.request = request; // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } } +}; -} - -const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; -const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request, query, options) { - if (typeof query === "string" && options && "query" in options) { - return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } } - - const parsedOptions = typeof query === "string" ? Object.assign({ - query - }, options) : query; - const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { if (NON_VARIABLE_OPTIONS.includes(key)) { result[key] = parsedOptions[key]; return result; } - if (!result.variables) { result.variables = {}; } - result.variables[key] = parsedOptions[key]; return result; - }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix - // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 - - const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; - + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); } - - return request(requestOptions).then(response => { + return request2(requestOptions).then((response) => { if (response.data.errors) { const headers = {}; - for (const key of Object.keys(response.headers)) { headers[key] = response.headers[key]; } - - throw new GraphqlError(requestOptions, { + throw new GraphqlResponseError( + requestOptions, headers, - data: response.data - }); + response.data + ); } - return response.data.data; }); } -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); - +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); const newApi = (query, options) => { return graphql(newRequest, query, options); }; - return Object.assign(newApi, { defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint + endpoint: newRequest.endpoint }); } -const graphql$1 = withDefaults(request.request, { +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` }, method: "POST", url: "/graphql" @@ -6154,45 +7880,59 @@ function withCustomRequest(customRequest) { url: "/graphql" }); } - -exports.graphql = graphql$1; -exports.withCustomRequest = withCustomRequest; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 4193: -/***/ ((__unused_webpack_module, exports) => { +/***/ 8082: +/***/ ((module) => { "use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +module.exports = __toCommonJS(dist_src_exports); -const VERSION = "2.6.0"; +// pkg/dist-src/version.js +var VERSION = "9.2.2"; -/** - * Some “list” response that can be paginated have a different response structure - * - * They have a `total_count` key in the response (search also has `incomplete_results`, - * /installation/repositories also has `repository_selection`), as well as a key with - * the list of the items which name varies from endpoint to endpoint. - * - * Octokit normalizes these responses so that paginated results are always returned following - * the same structure. One challenge is that if the list response has only one page, no Link - * header is provided, so this header alone is not sufficient to check wether a response is - * paginated or not. - * - * We check if a "total_count" key is present in the response data, but also make sure that - * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would - * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref - */ +// pkg/dist-src/normalize-paginated-list-response.js function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way - // to retrieve the same information. - + if (!responseNeedsNormalization) + return response; const incompleteResults = response.data.incomplete_results; const repositorySelection = response.data.repository_selection; const totalCount = response.data.total_count; @@ -6202,19 +7942,17 @@ function normalizePaginatedListResponse(response) { const namespaceKey = Object.keys(response.data)[0]; const data = response.data[namespaceKey]; response.data = data; - if (typeof incompleteResults !== "undefined") { response.data.incomplete_results = incompleteResults; } - if (typeof repositorySelection !== "undefined") { response.data.repository_selection = repositorySelection; } - response.data.total_count = totalCount; return response; } +// pkg/dist-src/iterator.js function iterator(octokit, route, parameters) { const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); const requestMethod = typeof route === "function" ? route : octokit.request; @@ -6224,68 +7962,317 @@ function iterator(octokit, route, parameters) { return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) return { - done: true - }; - const response = await requestMethod({ - method, - url, - headers - }); - const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format: - // '; rel="next", ; rel="last"' - // sets `url` to undefined if "next" URL is not present or `link` header is not set - - url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { - value: normalizedResponse - }; + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^<>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } } - }) }; } +// pkg/dist-src/paginate.js function paginate(octokit, route, parameters, mapFn) { if (typeof parameters === "function") { mapFn = parameters; - parameters = undefined; + parameters = void 0; } - - return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); } - -function gather(octokit, results, iterator, mapFn) { - return iterator.next().then(result => { +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { if (result.done) { return results; } - let earlyExit = false; - function done() { earlyExit = true; } - - results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); - + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); if (earlyExit) { return results; } - - return gather(octokit, results, iterator, mapFn); + return gather(octokit, results, iterator2, mapFn); }); } -const composePaginateRest = Object.assign(paginate, { +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { iterator }); -/** - * @param octokit Octokit instance - * @param options Options passed to Octokit constructor - */ +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +// pkg/dist-src/index.js function paginateRest(octokit) { return { paginate: Object.assign(paginate.bind(null, octokit), { @@ -6294,91 +8281,390 @@ function paginateRest(octokit) { }; } paginateRest.VERSION = VERSION; - -exports.composePaginateRest = composePaginateRest; -exports.paginateRest = paginateRest; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 3044: -/***/ ((__unused_webpack_module, exports) => { +/***/ 4935: +/***/ ((module) => { "use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods +}); +module.exports = __toCommonJS(dist_src_exports); -const Endpoints = { +// pkg/dist-src/version.js +var VERSION = "10.4.1"; + +// pkg/dist-src/generated/endpoints.js +var Endpoints = { actions: { - addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], - cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repositories/{repository_id}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], - createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], - createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], - createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], - deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], - deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], - deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], - downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"], - downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"], - downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], - getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"], - getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], - listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables" + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"], - listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], - listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], - removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], - setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"] + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setCustomOidcSubClaimForRepo: [ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ] }, activity: { checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], getFeeds: ["GET /feeds"], getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], listEventsForAuthenticatedUser: ["GET /users/{username}/events"], listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], listPublicEvents: ["GET /events"], listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], listPublicEventsForUser: ["GET /users/{username}/events/public"], listPublicOrgEvents: ["GET /orgs/{org}/events"], listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], listReposStarredByAuthenticatedUser: ["GET /user/starred"], listReposStarredByUser: ["GET /users/{username}/starred"], listReposWatchedByUser: ["GET /users/{username}/subscriptions"], @@ -6387,22 +8673,29 @@ const Endpoints = { listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], markNotificationsAsRead: ["PUT /notifications"], markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] }, apps: { - addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], checkToken: ["POST /applications/{client_id}/token"], - createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", { - mediaType: { - previews: ["corsair"] - } - }], createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], deleteAuthorization: ["DELETE /applications/{client_id}/grant"], deleteInstallation: ["DELETE /app/installations/{installation_id}"], deleteToken: ["DELETE /applications/{client_id}/token"], @@ -6411,121 +8704,323 @@ const Endpoints = { getInstallation: ["GET /app/installations/{installation_id}"], getOrgInstallation: ["GET /orgs/{org}/installation"], getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"], - getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], - listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], listInstallations: ["GET /app/installations"], listInstallationsForAuthenticatedUser: ["GET /user/installations"], listPlans: ["GET /marketplace_listing/plans"], listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], listReposAccessibleToInstallation: ["GET /installation/repositories"], listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], - listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], - removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"] + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] }, billing: { getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], - getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], - getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], - getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"] + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] }, checks: { - create: ["POST /repos/{owner}/{repo}/check-runs", { - mediaType: { - previews: ["antiope"] - } - }], - createSuite: ["POST /repos/{owner}/{repo}/check-suites", { - mediaType: { - previews: ["antiope"] - } - }], - get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}", { - mediaType: { - previews: ["antiope"] - } - }], - getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}", { - mediaType: { - previews: ["antiope"] - } - }], - listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", { - mediaType: { - previews: ["antiope"] - } - }], - listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs", { - mediaType: { - previews: ["antiope"] - } - }], - listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", { - mediaType: { - previews: ["antiope"] - } - }], - listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites", { - mediaType: { - previews: ["antiope"] - } - }], - rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", { - mediaType: { - previews: ["antiope"] - } - }], - setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences", { - mediaType: { - previews: ["antiope"] - } - }], - update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}", { - mediaType: { - previews: ["antiope"] - } - }] + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] }, codeScanning: { - getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, { - renamedParameters: { - alert_id: "alert_number" - } - }], + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] }, codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct", { - mediaType: { - previews: ["scarlet-witch"] - } - }], - getConductCode: ["GET /codes_of_conduct/{key}", { - mediaType: { - previews: ["scarlet-witch"] - } - }], - getForRepo: ["GET /repos/{owner}/{repo}/community/code_of_conduct", { - mediaType: { - previews: ["scarlet-witch"] - } - }] + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] }, - emojis: { - get: ["GET /emojis"] + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] }, + copilot: { + addCopilotSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, gists: { checkIsStarred: ["GET /gists/{gist_id}/star"], create: ["POST /gists"], @@ -6568,48 +9063,55 @@ const Endpoints = { getTemplate: ["GET /gitignore/templates/{name}"] }, interactions: { - getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }], - getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }], - removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }], - removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }], - setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }], - setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits", { - mediaType: { - previews: ["sombra"] - } - }] + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] }, issues: { - addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], create: ["POST /repos/{owner}/{repo}/issues"], - createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], createLabel: ["POST /repos/{owner}/{repo}/labels"], createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], @@ -6621,28 +9123,38 @@ const Endpoints = { listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", { - mediaType: { - previews: ["mockingbird"] - } - }], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], listForAuthenticatedUser: ["GET /user/issues"], listForOrg: ["GET /orgs/{org}/issues"], listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], listMilestones: ["GET /repos/{owner}/{repo}/milestones"], lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"], - removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"], - removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"] + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] }, licenses: { get: ["GET /licenses/{license}"], @@ -6651,546 +9163,789 @@ const Endpoints = { }, markdown: { render: ["POST /markdown"], - renderRaw: ["POST /markdown/raw", { - headers: { - "content-type": "text/plain; charset=utf-8" - } - }] + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] }, meta: { - get: ["GET /meta"] + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] }, migrations: { - cancelImport: ["DELETE /repos/{owner}/{repo}/import"], - deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] + cancelImport: [ + "DELETE /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" } - }], - deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] + ], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getCommitAuthors: [ + "GET /repos/{owner}/{repo}/import/authors", + {}, + { + deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" } - }], - downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] + ], + getImportStatus: [ + "GET /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" } - }], - getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive", { - mediaType: { - previews: ["wyandotte"] + ], + getLargeFiles: [ + "GET /repos/{owner}/{repo}/import/large_files", + {}, + { + deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" } - }], - getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], - getImportStatus: ["GET /repos/{owner}/{repo}/import"], - getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}", { - mediaType: { - previews: ["wyandotte"] + ], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + mapCommitAuthor: [ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", + {}, + { + deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" } - }], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}", { - mediaType: { - previews: ["wyandotte"] + ], + setLfsPreference: [ + "PATCH /repos/{owner}/{repo}/import/lfs", + {}, + { + deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" } - }], - listForAuthenticatedUser: ["GET /user/migrations", { - mediaType: { - previews: ["wyandotte"] - } - }], - listForOrg: ["GET /orgs/{org}/migrations", { - mediaType: { - previews: ["wyandotte"] - } - }], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories", { - mediaType: { - previews: ["wyandotte"] - } - }], - listReposForUser: ["GET /user/migrations/{migration_id}/repositories", { - mediaType: { - previews: ["wyandotte"] - } - }], - mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], - setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], + ], startForAuthenticatedUser: ["POST /user/migrations"], startForOrg: ["POST /orgs/{org}/migrations"], - startImport: ["PUT /repos/{owner}/{repo}/import"], - unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", { - mediaType: { - previews: ["wyandotte"] + startImport: [ + "PUT /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" } - }], - unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", { - mediaType: { - previews: ["wyandotte"] + ], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ], + updateImport: [ + "PATCH /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" } - }], - updateImport: ["PATCH /repos/{owner}/{repo}/import"] + ] + }, + oidc: { + getOidcCustomSubTemplateForOrg: [ + "GET /orgs/{org}/actions/oidc/customization/sub" + ], + updateOidcCustomSubTemplateForOrg: [ + "PUT /orgs/{org}/actions/oidc/customization/sub" + ] }, orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], + assignTeamToOrgRole: [ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + assignUserToOrgRole: [ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], + createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteCustomOrganizationRole: [ + "DELETE /orgs/{org}/organization-roles/{role_id}" + ], deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], listMembers: ["GET /orgs/{org}/members"], listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: [ + "GET /orgs/{org}/organization-fine-grained-permissions" + ], listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], listPendingInvitations: ["GET /orgs/{org}/invitations"], listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /orgs/{org}/hooks"], + patchCustomOrganizationRole: [ + "PATCH /orgs/{org}/organization-roles/{role_id}" + ], pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], removeMember: ["DELETE /orgs/{org}/members/{username}"], removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], - removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}" + ], + reviewPatGrantRequest: [ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], + revokeAllOrgRolesTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" + ], + revokeAllOrgRolesUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}" + ], + revokeOrgRoleTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + revokeOrgRoleUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], update: ["PATCH /orgs/{org}"], - updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"], - updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"] + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] + } + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] }, projects: { - addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", { - mediaType: { - previews: ["inertia"] - } - }], - createCard: ["POST /projects/columns/{column_id}/cards", { - mediaType: { - previews: ["inertia"] - } - }], - createColumn: ["POST /projects/{project_id}/columns", { - mediaType: { - previews: ["inertia"] - } - }], - createForAuthenticatedUser: ["POST /user/projects", { - mediaType: { - previews: ["inertia"] - } - }], - createForOrg: ["POST /orgs/{org}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - createForRepo: ["POST /repos/{owner}/{repo}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - delete: ["DELETE /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - deleteCard: ["DELETE /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - deleteColumn: ["DELETE /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }], - get: ["GET /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getCard: ["GET /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getColumn: ["GET /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }], - getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission", { - mediaType: { - previews: ["inertia"] - } - }], - listCards: ["GET /projects/columns/{column_id}/cards", { - mediaType: { - previews: ["inertia"] - } - }], - listCollaborators: ["GET /projects/{project_id}/collaborators", { - mediaType: { - previews: ["inertia"] - } - }], - listColumns: ["GET /projects/{project_id}/columns", { - mediaType: { - previews: ["inertia"] - } - }], - listForOrg: ["GET /orgs/{org}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - listForRepo: ["GET /repos/{owner}/{repo}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - listForUser: ["GET /users/{username}/projects", { - mediaType: { - previews: ["inertia"] - } - }], - moveCard: ["POST /projects/columns/cards/{card_id}/moves", { - mediaType: { - previews: ["inertia"] - } - }], - moveColumn: ["POST /projects/columns/{column_id}/moves", { - mediaType: { - previews: ["inertia"] - } - }], - removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}", { - mediaType: { - previews: ["inertia"] - } - }], - update: ["PATCH /projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - updateCard: ["PATCH /projects/columns/cards/{card_id}", { - mediaType: { - previews: ["inertia"] - } - }], - updateColumn: ["PATCH /projects/columns/{column_id}", { - mediaType: { - previews: ["inertia"] - } - }] + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] }, pulls: { checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"], - deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", { - mediaType: { - previews: ["lydian"] - } - }], - updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] - }, - rateLimit: { - get: ["GET /rate_limit"] + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] }, + rateLimit: { get: ["GET /rate_limit"] }, reactions: { - createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - deleteLegacy: ["DELETE /reactions/{reaction_id}", { - mediaType: { - previews: ["squirrel-girl"] - } - }, { - deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://developer.github.com/v3/reactions/#delete-a-reaction-legacy" - }], - listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }], - listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", { - mediaType: { - previews: ["squirrel-girl"] - } - }] + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] }, repos: { - acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}"], - addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - addTeamAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - addUserAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + cancelPagesDeployment: [ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], - createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], - createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], createDeployKey: ["POST /repos/{owner}/{repo}/keys"], createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], createForAuthenticatedUser: ["POST /user/repos"], createFork: ["POST /repos/{owner}/{repo}/forks"], createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateCustomPropertiesValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages", { - mediaType: { - previews: ["switcheroo"] - } - }], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], createRelease: ["POST /repos/{owner}/{repo}/releases"], - createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate", { - mediaType: { - previews: ["baptiste"] - } - }], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], delete: ["DELETE /repos/{owner}/{repo}"], - deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], - deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], - deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages", { - mediaType: { - previews: ["switcheroo"] - } - }], - deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], - deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" + ], deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes", { - mediaType: { - previews: ["london"] - } - }], - disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], - downloadArchive: ["GET /repos/{owner}/{repo}/{archive_format}/{ref}"], - enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes", { - mediaType: { - previews: ["london"] - } - }], - enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts", { - mediaType: { - previews: ["dorian"] - } - }], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], - getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], - getAllTopics: ["GET /repos/{owner}/{repo}/topics", { - mediaType: { - previews: ["mercy"] - } - }], - getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", { - mediaType: { - previews: ["zzzax"] - } - }], - getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile", { - mediaType: { - previews: ["black-panther"] - } - }], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], getPages: ["GET /repos/{owner}/{repo}/pages"], getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesDeployment: [ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" + ], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], getViews: ["GET /repos/{owner}/{repo}/traffic/views"], getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", { - mediaType: { - previews: ["groot"] - } - }], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], listCommits: ["GET /repos/{owner}/{repo}/commits"], listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], listDeployments: ["GET /repos/{owner}/{repo}/deployments"], listForAuthenticatedUser: ["GET /user/repos"], listForOrg: ["GET /orgs/{org}/repos"], @@ -7201,535 +9956,836 @@ const Endpoints = { listLanguages: ["GET /repos/{owner}/{repo}/languages"], listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", { - mediaType: { - previews: ["groot"] - } - }], - listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], listTags: ["GET /repos/{owner}/{repo}/tags"], listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], - removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"], - removeStatusCheckContexts: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - removeTeamAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics", { - mediaType: { - previews: ["mercy"] - } - }], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - setStatusCheckContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - setTeamAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - setUserAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], transfer: ["POST /repos/{owner}/{repo}/transfer"], update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"], - updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"], - updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { - baseUrl: "https://uploads.github.com" - }] + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] }, search: { code: ["GET /search/code"], - commits: ["GET /search/commits", { - mediaType: { - previews: ["cloak"] - } - }], + commits: ["GET /search/commits"], issuesAndPullRequests: ["GET /search/issues"], labels: ["GET /search/labels"], repos: ["GET /search/repositories"], - topics: ["GET /search/topics", { - mediaType: { - previews: ["mercy"] - } - }], + topics: ["GET /search/topics"], users: ["GET /search/users"] }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + securityAdvisories: { + createFork: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" + ], + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, teams: { - addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"], - addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", { - mediaType: { - previews: ["inertia"] - } - }], - checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], - getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], list: ["GET /orgs/{org}/teams"], listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], listForAuthenticatedUser: ["GET /user/teams"], listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], - listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], - listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects", { - mediaType: { - previews: ["inertia"] - } - }], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], - removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"], - removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] }, users: { - addEmailForAuthenticated: ["POST /user/emails"], + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], block: ["PUT /user/blocks/{username}"], checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: ["POST /user/keys"], - deleteEmailForAuthenticated: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], follow: ["PUT /user/following/{username}"], getAuthenticated: ["GET /user"], getByUsername: ["GET /users/{username}"], getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], list: ["GET /users"], - listBlockedByAuthenticated: ["GET /user/blocks"], - listEmailsForAuthenticated: ["GET /user/emails"], - listFollowedByAuthenticated: ["GET /user/following"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], listFollowersForUser: ["GET /users/{username}/followers"], listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: ["GET /user/gpg_keys"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: ["GET /user/public_emails"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: ["GET /user/keys"], - setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"] } }; +var endpoints_default = Endpoints; -const VERSION = "4.2.1"; - -function endpointsToMethods(octokit, endpointsMap) { - const newMethods = {}; - - for (const [scope, endpoints] of Object.entries(endpointsMap)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign({ +// pkg/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { method, url - }, defaults); - - if (!newMethods[scope]) { - newMethods[scope] = {}; - } - - const scopeMethods = newMethods[scope]; - - if (decorations) { - scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); - continue; - } - - scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); } - return newMethods; } - function decorate(octokit, scope, methodName, defaults, decorations) { const requestWithDefaults = octokit.request.defaults(defaults); - /* istanbul ignore next */ - function withDecorations(...args) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData` - + let options = requestWithDefaults.endpoint.merge(...args); if (decorations.mapToData) { options = Object.assign({}, options, { data: options[decorations.mapToData], - [decorations.mapToData]: undefined + [decorations.mapToData]: void 0 }); return requestWithDefaults(options); } - if (decorations.renamed) { const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); } - if (decorations.deprecated) { octokit.log.warn(decorations.deprecated); } - if (decorations.renamedParameters) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - const options = requestWithDefaults.endpoint.merge(...args); - - for (const [name, alias] of Object.entries(decorations.renamedParameters)) { - if (name in options) { - octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); - - if (!(alias in options)) { - options[alias] = options[name]; + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; } - - delete options[name]; + delete options2[name]; } } - - return requestWithDefaults(options); - } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - - + return requestWithDefaults(options2); + } return requestWithDefaults(...args); } - return Object.assign(withDecorations, requestWithDefaults); } -/** - * This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary - * goal is to rebuild @octokit/rest on top of @octokit/core. Once that is - * done, we will remove the registerEndpoints methods and return the methods - * directly as with the other plugins. At that point we will also remove the - * legacy workarounds and deprecations. - * - * See the plan at - * https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1 - */ - +// pkg/dist-src/index.js function restEndpointMethods(octokit) { - return endpointsToMethods(octokit, Endpoints); + const api = endpointsToMethods(octokit); + return { + rest: api + }; } restEndpointMethods.VERSION = VERSION; - -exports.restEndpointMethods = restEndpointMethods; -//# sourceMappingURL=index.js.map +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 537: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 3708: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var deprecation = __nccwpck_require__(8932); -var once = _interopDefault(__nccwpck_require__(1223)); - -const logOnce = once(deprecation => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ - -class RequestError extends Error { +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(4150); +var import_once = __toESM(__nccwpck_require__(5560)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - + super(message); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } - this.name = "HttpError"; this.status = statusCode; - Object.defineProperty(this, "code", { - get() { - logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - - }); - this.headers = options.headers || {}; // redact request credentials without mutating original request options - + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + authorization: options.request.headers.authorization.replace( + /(? { +/***/ 8636: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(4471); +var import_universal_user_agent = __nccwpck_require__(3843); -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } +// pkg/dist-src/version.js +var VERSION = "8.4.1"; -var endpoint = __nccwpck_require__(9440); -var universalUserAgent = __nccwpck_require__(5030); -var isPlainObject = __nccwpck_require__(9062); -var nodeFetch = _interopDefault(__nccwpck_require__(467)); -var requestError = __nccwpck_require__(537); +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} -const VERSION = "5.4.10"; +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(3708); +// pkg/dist-src/get-buffer-response.js function getBufferResponse(response) { return response.arrayBuffer(); } +// pkg/dist-src/fetch-wrapper.js function fetchWrapper(requestOptions) { - if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + var _a, _b, _c, _d; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); } - let headers = {}; let status; let url; - const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { method: requestOptions.method, body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, headers: requestOptions.headers, - redirect: requestOptions.redirect - }, requestOptions.request)).then(response => { + signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { url = response.url; status = response.status; - for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; } - + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } if (status === 204 || status === 205) { return; - } // GitHub API returns 200 for HEAD requests - - + } if (requestOptions.method === "HEAD") { if (status < 400) { return; } - - throw new requestError.RequestError(response.statusText, status, { - headers, - request: requestOptions - }); - } - - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { - headers, - request: requestOptions - }); - } - - if (status >= 400) { - return response.text().then(message => { - const error = new requestError.RequestError(message, status, { + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, headers, - request: requestOptions - }); - - try { - let responseBody = JSON.parse(error.message); - Object.assign(error, responseBody); - let errors = responseBody.errors; // Assumption `errors` would always be in Array format - - error.message = error.message + ": " + errors.map(JSON.stringify).join(", "); - } catch (e) {// ignore, see octokit/rest.js#684 - } - - throw error; + data: void 0 + }, + request: requestOptions }); } - - const contentType = response.headers.get("content-type"); - - if (/application\/json/.test(contentType)) { - return response.json(); + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); } - - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; } - - return getBufferResponse(response); - }).then(data => { + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { return { status, url, headers, data }; - }).catch(error => { - if (error instanceof requestError.RequestError) { + }).catch((error) => { + if (error instanceof import_request_error.RequestError) throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } } - - throw new requestError.RequestError(error.message, 500, { - headers, + throw new import_request_error.RequestError(message, 500, { request: requestOptions }); }); } - -function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; + } + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; } + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; +} - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); }; - - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) }); - return endpointOptions.request.hook(request, endpointOptions); + return endpointOptions.request.hook(request2, endpointOptions); }; - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) }); } -const request = withDefaults(endpoint.endpoint, { +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` } }); - -exports.request = request; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), -/***/ 9062: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(o) { - return Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (ctor === undefined) return true; - - // If has modified prototype - prot = ctor.prototype; - if (isObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -} - -exports.isPlainObject = isPlainObject; - - -/***/ }), - -/***/ 7678: +/***/ 4001: /***/ ((module, exports) => { "use strict"; @@ -7764,6 +10820,7 @@ const objectTypeNames = [ 'Observable', 'Array', 'Buffer', + 'Blob', 'Object', 'RegExp', 'Date', @@ -7777,6 +10834,8 @@ const objectTypeNames = [ 'DataView', 'Promise', 'URL', + 'FormData', + 'URLSearchParams', 'HTMLElement', ...typedArrayTypeNames ]; @@ -7872,11 +10931,12 @@ is.array = (value, assertion) => { return value.every(assertion); }; is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; }; +is.blob = (value) => isObjectOfType('Blob')(value); is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value)); is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); }; is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); }; -is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); +is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); }; is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw); is.nativePromise = (value) => isObjectOfType('Promise')(value); const hasPromiseAPI = (value) => { @@ -7911,6 +10971,7 @@ is.bigUint64Array = isObjectOfType('BigUint64Array'); is.arrayBuffer = isObjectOfType('ArrayBuffer'); is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); is.dataView = isObjectOfType('DataView'); +is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value); is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype; is.urlInstance = (value) => isObjectOfType('URL')(value); is.urlString = (value) => { @@ -7925,7 +10986,6 @@ is.urlString = (value) => { return false; } }; -// TODO: Use the `not` operator with a type guard here when it's available. // Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);` is.truthy = (value) => Boolean(value); // Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);` @@ -7935,7 +10995,7 @@ is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value); is.integer = (value) => Number.isInteger(value); is.safeInteger = (value) => Number.isSafeInteger(value); is.plainObject = (value) => { - // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js + // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js if (toString.call(value) !== '[object Object]') { return false; } @@ -7991,10 +11051,12 @@ is.oddInteger = isAbsoluteMod2(1); is.emptyArray = (value) => is.array(value) && value.length === 0; is.nonEmptyArray = (value) => is.array(value) && value.length > 0; is.emptyString = (value) => is.string(value) && value.length === 0; -// TODO: Use `not ''` when the `not` operator is available. -is.nonEmptyString = (value) => is.string(value) && value.length > 0; const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value); is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value); +// TODO: Use `not ''` when the `not` operator is available. +is.nonEmptyString = (value) => is.string(value) && value.length > 0; +// TODO: Use `not ''` when the `not` operator is available. +is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value); is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0; // TODO: Use `not` operator here to remove `Map` and `Set` from type guard: // - https://github.com/Microsoft/TypeScript/pull/29317 @@ -8003,6 +11065,10 @@ is.emptySet = (value) => is.set(value) && value.size === 0; is.nonEmptySet = (value) => is.set(value) && value.size > 0; is.emptyMap = (value) => is.map(value) && value.size === 0; is.nonEmptyMap = (value) => is.map(value) && value.size > 0; +// `PropertyKey` is any value that can be used as an object key (string, number, or symbol) +is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value); +is.formData = (value) => isObjectOfType('FormData')(value); +is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value); const predicateOnArray = (method, predicate, values) => { if (!is.function_(predicate)) { throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`); @@ -8017,9 +11083,15 @@ is.any = (predicate, ...values) => { return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values)); }; is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values); -const assertType = (condition, description, value) => { +const assertType = (condition, description, value, options = {}) => { if (!condition) { - throw new TypeError(`Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`); + const { multipleValues } = options; + const valuesMessage = multipleValues ? + `received values of types ${[ + ...new Set(value.map(singleValue => `\`${is(singleValue)}\``)) + ].join(', ')}` : + `received value of type \`${is(value)}\``; + throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`); } }; exports.assert = { @@ -8043,6 +11115,7 @@ exports.assert = { } }, buffer: (value) => assertType(is.buffer(value), 'Buffer', value), + blob: (value) => assertType(is.blob(value), 'Blob', value), nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value), object: (value) => assertType(is.object(value), 'Object', value), iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value), @@ -8078,6 +11151,7 @@ exports.assert = { arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value), sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value), dataView: (value) => assertType(is.dataView(value), 'DataView', value), + enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value), urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value), urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value), truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value), @@ -8096,14 +11170,18 @@ exports.assert = { emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value), nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value), emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value), - nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value), emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value), + nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value), + nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value), emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value), nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value), emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value), nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value), emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value), nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value), + propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value), + formData: (value) => assertType(is.formData(value), 'FormData', value), + urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value), // Numbers. evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value), oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value), @@ -8111,8 +11189,10 @@ exports.assert = { directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance), inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value), // Variadic functions. - any: (predicate, ...values) => assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values), - all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values) + any: (predicate, ...values) => { + return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true }); + }, + all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true }) }; // Some few keywords are reserved, but we'll populate them for Node.js users // See https://github.com/Microsoft/TypeScript/issues/2536 @@ -8138,24 +11218,28 @@ Object.defineProperties(exports.assert, { value: exports.assert.null_ } }); -exports.default = is; +exports["default"] = is; // For CommonJS default export support module.exports = is; -module.exports.default = is; +module.exports["default"] = is; module.exports.assert = exports.assert; /***/ }), -/***/ 8097: +/***/ 4480: /***/ ((module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const defer_to_connect_1 = __nccwpck_require__(6214); +const defer_to_connect_1 = __nccwpck_require__(2114); +const util_1 = __nccwpck_require__(9023); const nodejsMajorVersion = Number(process.versions.node.split('.')[0]); const timer = (request) => { + if (request.timings) { + return request.timings; + } const timings = { start: Date.now(), socket: undefined, @@ -8193,17 +11277,21 @@ const timer = (request) => { }; }; handleError(request); - request.prependOnceListener('abort', () => { + const onAbort = () => { timings.abort = Date.now(); // Let the `end` response event be responsible for setting the total phase, // unless the Node.js major version is >= 13. if (!timings.response || nodejsMajorVersion >= 13) { timings.phases.total = Date.now() - timings.start; } - }); + }; + request.prependOnceListener('abort', onAbort); const onSocket = (socket) => { timings.socket = Date.now(); timings.phases.wait = timings.socket - timings.start; + if (util_1.types.isProxy(socket)) { + return; + } const lookupListener = () => { timings.lookup = Date.now(); timings.phases.dns = timings.lookup - timings.socket; @@ -8236,7 +11324,7 @@ const timer = (request) => { const onUpload = () => { var _a; timings.upload = Date.now(); - timings.phases.request = timings.upload - (_a = timings.secureConnect, (_a !== null && _a !== void 0 ? _a : timings.connect)); + timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect); }; const writableFinished = () => { if (typeof request.writableFinished === 'boolean') { @@ -8261,700 +11349,984 @@ const timer = (request) => { timings.phases.download = timings.end - timings.response; timings.phases.total = timings.end - timings.start; }); + response.prependOnceListener('aborted', onAbort); }); return timings; }; -exports.default = timer; +exports["default"] = timer; // For CommonJS default export support module.exports = timer; -module.exports.default = timer; +module.exports["default"] = timer; /***/ }), -/***/ 6761: +/***/ 1316: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Utils = __nccwpck_require__(5182); -var fs = Utils.FileSystem.require(), - pth = __nccwpck_require__(5622); +const Utils = __nccwpck_require__(5391); +const pth = __nccwpck_require__(6928); +const ZipEntry = __nccwpck_require__(2609); +const ZipFile = __nccwpck_require__(6991); -fs.existsSync = fs.existsSync || pth.existsSync; +const get_Bool = (...val) => Utils.findLast(val, (c) => typeof c === "boolean"); +const get_Str = (...val) => Utils.findLast(val, (c) => typeof c === "string"); +const get_Fun = (...val) => Utils.findLast(val, (c) => typeof c === "function"); -var ZipEntry = __nccwpck_require__(4057), - ZipFile = __nccwpck_require__(7744); +const defaultOptions = { + // option "noSort" : if true it disables files sorting + noSort: false, + // read entries during load (initial loading may be slower) + readEntries: false, + // default method is none + method: Utils.Constants.NONE, + // file system + fs: null +}; -var isWin = /^win/.test(process.platform); +module.exports = function (/**String*/ input, /** object */ options) { + let inBuffer = null; -function canonical(p) { - var safeSuffix = pth.normalize(p).replace(/^(\.\.(\/|\\|$))+/, ''); - return pth.join('./', safeSuffix); -} + // create object based default options, allowing them to be overwritten + const opts = Object.assign(Object.create(null), defaultOptions); -module.exports = function (/**String*/input) { - var _zip = undefined, - _filename = ""; + // test input variable + if (input && "object" === typeof input) { + // if value is not buffer we accept it to be object with options + if (!(input instanceof Uint8Array)) { + Object.assign(opts, input); + input = opts.input ? opts.input : undefined; + if (opts.input) delete opts.input; + } - if (input && typeof input === "string") { // load zip file - if (fs.existsSync(input)) { - _filename = input; - _zip = new ZipFile(input, Utils.Constants.FILE); - } else { - throw new Error(Utils.Errors.INVALID_FILENAME); - } - } else if (input && Buffer.isBuffer(input)) { // load buffer - _zip = new ZipFile(input, Utils.Constants.BUFFER); - } else { // create new zip file - _zip = new ZipFile(null, Utils.Constants.NONE); - } - - function sanitize(prefix, name) { - prefix = pth.resolve(pth.normalize(prefix)); - var parts = name.split('/'); - for (var i = 0, l = parts.length; i < l; i++) { - var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); - if (path.indexOf(prefix) === 0) { - return path; - } - } - return pth.normalize(pth.join(prefix, pth.basename(name))); - } - - function getEntry(/**Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - function fixPath(zipPath){ - // convert windows file separators - zipPath = zipPath.split("\\").join("/"); - // add separator if it wasnt given - if (zipPath.charAt(zipPath.length - 1) !== "/") { - zipPath += "/"; - } - return zipPath; + // if input is buffer + if (Buffer.isBuffer(input)) { + inBuffer = input; + opts.method = Utils.Constants.BUFFER; + input = undefined; + } } - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile: function (/**Object*/entry, /*String, Buffer*/pass) { - var item = getEntry(entry); - return item && item.getData(pass) || null; - }, + // assign options + Object.assign(opts, options); - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync: function (/**Object*/entry, /**Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null, "getEntry failed for:" + entry) - } - }, + // instanciate utils filesystem + const filetools = new Utils(opts); - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText: function (/**Object*/entry, /**String=*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, + if (typeof opts.decoder !== "object" || typeof opts.decoder.encode !== "function" || typeof opts.decoder.decode !== "function") { + opts.decoder = Utils.decoder; + } - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync: function (/**Object*/entry, /**Function*/callback, /**String=*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function (data, err) { - if (err) { - callback(data, err); - return; - } + // if input is file name we retrieve its content + if (input && "string" === typeof input) { + // load zip file + if (filetools.fs.existsSync(input)) { + opts.method = Utils.Constants.FILE; + opts.filename = input; + inBuffer = filetools.fs.readFileSync(input); + } else { + throw Utils.Errors.INVALID_FILENAME(); + } + } - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, + // create variable + const _zip = new ZipFile(inBuffer, opts); - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile: function (/**Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, + const { canonical, sanitize, zipnamefix } = Utils; - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment: function (/**String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, + function getEntry(/**Object*/ entry) { + if (entry && _zip) { + var item; + // If entry was given as a file name + if (typeof entry === "string") item = _zip.getEntry(pth.posix.normalize(entry)); + // if entry was given as a ZipEntry object + if (typeof entry === "object" && typeof entry.entryName !== "undefined" && typeof entry.header !== "undefined") item = _zip.getEntry(entry.entryName); - /** - * Returns the zip comment - * - * @return String - */ - getZipComment: function () { - return _zip.comment || ''; - }, + if (item) { + return item; + } + } + return null; + } - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment: function (/**Object*/entry, /**String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, + function fixPath(zipPath) { + const { join, normalize, sep } = pth.posix; + // convert windows file separators and normalize + return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep)); + } - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment: function (/**Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, + function filenameFilter(filterfn) { + if (filterfn instanceof RegExp) { + // if filter is RegExp wrap it + return (function (rx) { + return function (filename) { + return rx.test(filename); + }; + })(filterfn); + } else if ("function" !== typeof filterfn) { + // if filter is not function we will replace it + return () => true; + } + return filterfn; + } - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile: function (/**Object*/entry, /**Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, + // keep last character on folders + const relativePath = (local, entry) => { + let lastChar = entry.slice(-1); + lastChar = lastChar === filetools.sep ? filetools.sep : ""; + return pth.relative(local, entry) + lastChar; + }; - /** - * Adds a file from the disk to the archive - * - * @param localPath File to add to zip - * @param zipPath Optional path inside the zip - * @param zipName Optional name for the file - */ - addLocalFile: function (/**String*/localPath, /**String=*/zipPath, /**String=*/zipName, /**String*/comment) { - if (fs.existsSync(localPath)) { - // fix ZipPath - zipPath = (zipPath) ? fixPath(zipPath) : ""; + return { + /** + * Extracts the given entry from the archive and returns the content as a Buffer object + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {Buffer|string} [pass] - password + * @return Buffer or Null in case of error + */ + readFile: function (entry, pass) { + var item = getEntry(entry); + return (item && item.getData(pass)) || null; + }, - // p - local file name - var p = localPath.split("\\").join("/").split("/").pop(); + /** + * Returns how many child elements has on entry (directories) on files it is always 0 + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @returns {integer} + */ + childCount: function (entry) { + const item = getEntry(entry); + if (item) { + return _zip.getChildCount(item); + } + }, - // add file name into zippath - zipPath += (zipName) ? zipName : p; + /** + * Asynchronous readFile + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {callback} callback + * + * @return Buffer or Null in case of error + */ + readFileAsync: function (entry, callback) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(callback); + } else { + callback(null, "getEntry failed for:" + entry); + } + }, - // read file attributes - const _attr = fs.statSync(localPath); + /** + * Extracts the given entry from the archive and returns the content as plain text in the given encoding + * @param {ZipEntry|string} entry - ZipEntry object or String with the full path of the entry + * @param {string} encoding - Optional. If no encoding is specified utf8 is used + * + * @return String + */ + readAsText: function (entry, encoding) { + var item = getEntry(entry); + if (item) { + var data = item.getData(); + if (data && data.length) { + return data.toString(encoding || "utf8"); + } + } + return ""; + }, - // add file into zip file - this.addFile(zipPath, fs.readFileSync(localPath), comment, _attr) - } else { - throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); - } - }, + /** + * Asynchronous readAsText + * @param {ZipEntry|string} entry ZipEntry object or String with the full path of the entry + * @param {callback} callback + * @param {string} [encoding] - Optional. If no encoding is specified utf8 is used + * + * @return String + */ + readAsTextAsync: function (entry, callback, encoding) { + var item = getEntry(entry); + if (item) { + item.getDataAsync(function (data, err) { + if (err) { + callback(data, err); + return; + } - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - * @param zipPath optional path inside zip - * @param filter optional RegExp or Function if files match will - * be included. - */ - addLocalFolder: function (/**String*/localPath, /**String=*/zipPath, /**=RegExp|Function*/filter) { + if (data && data.length) { + callback(data.toString(encoding || "utf8")); + } else { + callback(""); + } + }); + } else { + callback(""); + } + }, + + /** + * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory + * + * @param {ZipEntry|string} entry + * @returns {void} + */ + deleteFile: function (entry, withsubfolders = true) { + // @TODO: test deleteFile + var item = getEntry(entry); + if (item) { + _zip.deleteFile(item.entryName, withsubfolders); + } + }, + + /** + * Remove the entry from the file or directory without affecting any nested entries + * + * @param {ZipEntry|string} entry + * @returns {void} + */ + deleteEntry: function (entry) { + // @TODO: test deleteEntry + var item = getEntry(entry); + if (item) { + _zip.deleteEntry(item.entryName); + } + }, + + /** + * Adds a comment to the zip. The zip must be rewritten after adding the comment. + * + * @param {string} comment + */ + addZipComment: function (comment) { + // @TODO: test addZipComment + _zip.comment = comment; + }, + + /** + * Returns the zip comment + * + * @return String + */ + getZipComment: function () { + return _zip.comment || ""; + }, + + /** + * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment + * The comment cannot exceed 65535 characters in length + * + * @param {ZipEntry} entry + * @param {string} comment + */ + addZipEntryComment: function (entry, comment) { + var item = getEntry(entry); + if (item) { + item.comment = comment; + } + }, + + /** + * Returns the comment of the specified entry + * + * @param {ZipEntry} entry + * @return String + */ + getZipEntryComment: function (entry) { + var item = getEntry(entry); + if (item) { + return item.comment || ""; + } + return ""; + }, + + /** + * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content + * + * @param {ZipEntry} entry + * @param {Buffer} content + */ + updateFile: function (entry, content) { + var item = getEntry(entry); + if (item) { + item.setData(content); + } + }, + + /** + * Adds a file from the disk to the archive + * + * @param {string} localPath File to add to zip + * @param {string} [zipPath] Optional path inside the zip + * @param {string} [zipName] Optional name for the file + * @param {string} [comment] Optional file comment + */ + addLocalFile: function (localPath, zipPath, zipName, comment) { + if (filetools.fs.existsSync(localPath)) { + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // p - local file name + const p = pth.win32.basename(pth.win32.normalize(localPath)); + + // add file name into zippath + zipPath += zipName ? zipName : p; + + // read file attributes + const _attr = filetools.fs.statSync(localPath); + + // get file content + const data = _attr.isFile() ? filetools.fs.readFileSync(localPath) : Buffer.alloc(0); + + // if folder + if (_attr.isDirectory()) zipPath += filetools.sep; + + // add file into zip file + this.addFile(zipPath, data, comment, _attr); + } else { + throw Utils.Errors.FILE_NOT_FOUND(localPath); + } + }, + + /** + * Callback for showing if everything was done. + * + * @callback doneCallback + * @param {Error} err - Error object + * @param {boolean} done - was request fully completed + */ + + /** + * Adds a file from the disk to the archive + * + * @param {(object|string)} options - options object, if it is string it us used as localPath. + * @param {string} options.localPath - Local path to the file. + * @param {string} [options.comment] - Optional file comment. + * @param {string} [options.zipPath] - Optional path inside the zip + * @param {string} [options.zipName] - Optional name for the file + * @param {doneCallback} callback - The callback that handles the response. + */ + addLocalFileAsync: function (options, callback) { + options = typeof options === "object" ? options : { localPath: options }; + const localPath = pth.resolve(options.localPath); + const { comment } = options; + let { zipPath, zipName } = options; + const self = this; + + filetools.fs.stat(localPath, function (err, stats) { + if (err) return callback(err, false); + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + // p - local file name + const p = pth.win32.basename(pth.win32.normalize(localPath)); + // add file name into zippath + zipPath += zipName ? zipName : p; + + if (stats.isFile()) { + filetools.fs.readFile(localPath, function (err, data) { + if (err) return callback(err, false); + self.addFile(zipPath, data, comment, stats); + return setImmediate(callback, undefined, true); + }); + } else if (stats.isDirectory()) { + zipPath += filetools.sep; + self.addFile(zipPath, Buffer.alloc(0), comment, stats); + return setImmediate(callback, undefined, true); + } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {string} localPath - local path to the folder + * @param {string} [zipPath] - optional path inside zip + * @param {(RegExp|function)} [filter] - optional RegExp or Function if files match will be included. + */ + addLocalFolder: function (localPath, zipPath, filter) { // Prepare filter - if (filter instanceof RegExp) { // if filter is RegExp wrap it - filter = (function (rx){ + filter = filenameFilter(filter); + + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // normalize the path first + localPath = pth.normalize(localPath); + + if (filetools.fs.existsSync(localPath)) { + const items = filetools.findFiles(localPath); + const self = this; + + if (items.length) { + for (const filepath of items) { + const p = pth.join(zipPath, relativePath(localPath, filepath)); + if (filter(p)) { + self.addLocalFile(filepath, pth.dirname(p)); + } + } + } + } else { + throw Utils.Errors.FILE_NOT_FOUND(localPath); + } + }, + + /** + * Asynchronous addLocalFolder + * @param {string} localPath + * @param {callback} callback + * @param {string} [zipPath] optional path inside zip + * @param {RegExp|function} [filter] optional RegExp or Function if files match will + * be included. + */ + addLocalFolderAsync: function (localPath, callback, zipPath, filter) { + // Prepare filter + filter = filenameFilter(filter); + + // fix ZipPath + zipPath = zipPath ? fixPath(zipPath) : ""; + + // normalize the path first + localPath = pth.normalize(localPath); + + var self = this; + filetools.fs.open(localPath, "r", function (err) { + if (err && err.code === "ENOENT") { + callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); + } else if (err) { + callback(undefined, err); + } else { + var items = filetools.findFiles(localPath); + var i = -1; + + var next = function () { + i += 1; + if (i < items.length) { + var filepath = items[i]; + var p = relativePath(localPath, filepath).split("\\").join("/"); //windows fix + p = p + .normalize("NFD") + .replace(/[\u0300-\u036f]/g, "") + .replace(/[^\x20-\x7E]/g, ""); // accent fix + if (filter(p)) { + filetools.fs.stat(filepath, function (er0, stats) { + if (er0) callback(undefined, er0); + if (stats.isFile()) { + filetools.fs.readFile(filepath, function (er1, data) { + if (er1) { + callback(undefined, er1); + } else { + self.addFile(zipPath + p, data, "", stats); + next(); + } + }); + } else { + self.addFile(zipPath + p + "/", Buffer.alloc(0), "", stats); + next(); + } + }); + } else { + process.nextTick(() => { + next(); + }); + } + } else { + callback(true, undefined); + } + }; + + next(); + } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {object | string} options - options object, if it is string it us used as localPath. + * @param {string} options.localPath - Local path to the folder. + * @param {string} [options.zipPath] - optional path inside zip. + * @param {RegExp|function} [options.filter] - optional RegExp or Function if files match will be included. + * @param {function|string} [options.namefix] - optional function to help fix filename + * @param {doneCallback} callback - The callback that handles the response. + * + */ + addLocalFolderAsync2: function (options, callback) { + const self = this; + options = typeof options === "object" ? options : { localPath: options }; + localPath = pth.resolve(fixPath(options.localPath)); + let { zipPath, filter, namefix } = options; + + if (filter instanceof RegExp) { + filter = (function (rx) { return function (filename) { return rx.test(filename); - } + }; })(filter); - } else if ('function' !== typeof filter) { // if filter is not function we will replace it + } else if ("function" !== typeof filter) { filter = function () { return true; }; } // fix ZipPath - zipPath = (zipPath) ? fixPath(zipPath) : ""; + zipPath = zipPath ? fixPath(zipPath) : ""; - // normalize the path first - localPath = pth.normalize(localPath); + // Check Namefix function + if (namefix == "latin1") { + namefix = (str) => + str + .normalize("NFD") + .replace(/[\u0300-\u036f]/g, "") + .replace(/[^\x20-\x7E]/g, ""); // accent fix (latin1 characers only) + } - if (fs.existsSync(localPath)) { + if (typeof namefix !== "function") namefix = (str) => str; - var items = Utils.findFiles(localPath), - self = this; + // internal, create relative path + fix the name + const relPathFix = (entry) => pth.join(zipPath, namefix(relativePath(localPath, entry))); + const fileNameFix = (entry) => pth.win32.basename(pth.win32.normalize(namefix(entry))); - if (items.length) { - items.forEach(function (filepath) { - var p = pth.relative(localPath, filepath).split("\\").join("/"); //windows fix - if (filter(p)) { - if (filepath.charAt(filepath.length - 1) !== pth.sep) { - self.addFile(zipPath + p, fs.readFileSync(filepath), "", fs.statSync(filepath)); - } else { - self.addFile(zipPath + p + '/', Buffer.alloc(0), "", 0); - } - } + filetools.fs.open(localPath, "r", function (err) { + if (err && err.code === "ENOENT") { + callback(undefined, Utils.Errors.FILE_NOT_FOUND(localPath)); + } else if (err) { + callback(undefined, err); + } else { + filetools.findFilesAsync(localPath, function (err, fileEntries) { + if (err) return callback(err); + fileEntries = fileEntries.filter((dir) => filter(relPathFix(dir))); + if (!fileEntries.length) callback(undefined, false); + + setImmediate( + fileEntries.reverse().reduce(function (next, entry) { + return function (err, done) { + if (err || done === false) return setImmediate(next, err, false); + + self.addLocalFileAsync( + { + localPath: entry, + zipPath: pth.dirname(relPathFix(entry)), + zipName: fileNameFix(entry) + }, + next + ); + }; + }, callback) + ); }); } + }); + }, + + /** + * Adds a local directory and all its nested files and directories to the archive + * + * @param {string} localPath - path where files will be extracted + * @param {object} props - optional properties + * @param {string} [props.zipPath] - optional path inside zip + * @param {RegExp|function} [props.filter] - optional RegExp or Function if files match will be included. + * @param {function|string} [props.namefix] - optional function to help fix filename + */ + addLocalFolderPromise: function (localPath, props) { + return new Promise((resolve, reject) => { + this.addLocalFolderAsync2(Object.assign({ localPath }, props), (err, done) => { + if (err) reject(err); + if (done) resolve(this); + }); + }); + }, + + /** + * Allows you to create a entry (file or directory) in the zip file. + * If you want to create a directory the entryName must end in / and a null buffer should be provided. + * Comment and attributes are optional + * + * @param {string} entryName + * @param {Buffer | string} content - file content as buffer or utf8 coded string + * @param {string} [comment] - file comment + * @param {number | object} [attr] - number as unix file permissions, object as filesystem Stats object + */ + addFile: function (entryName, content, comment, attr) { + entryName = zipnamefix(entryName); + let entry = getEntry(entryName); + const update = entry != null; + + // prepare new entry + if (!update) { + entry = new ZipEntry(opts); + entry.entryName = entryName; + } + entry.comment = comment || ""; + + const isStat = "object" === typeof attr && attr instanceof filetools.fs.Stats; + + // last modification time from file stats + if (isStat) { + entry.header.time = attr.mtime; + } + + // Set file attribute + var fileattr = entry.isDirectory ? 0x10 : 0; // (MS-DOS directory flag) + + // extended attributes field for Unix + // set file type either S_IFDIR / S_IFREG + let unix = entry.isDirectory ? 0x4000 : 0x8000; + + if (isStat) { + // File attributes from file stats + unix |= 0xfff & attr.mode; + } else if ("number" === typeof attr) { + // attr from given attr values + unix |= 0xfff & attr; } else { - throw new Error(Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); + // Default values: + unix |= entry.isDirectory ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) + } + + fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes + + entry.attr = fileattr; + + entry.setData(content); + if (!update) _zip.setEntry(entry); + + return entry; + }, + + /** + * Returns an array of ZipEntry objects representing the files and folders inside the archive + * + * @param {string} [password] + * @returns Array + */ + getEntries: function (password) { + _zip.password = password; + return _zip ? _zip.entries : []; + }, + + /** + * Returns a ZipEntry object representing the file or folder specified by ``name``. + * + * @param {string} name + * @return ZipEntry + */ + getEntry: function (/**String*/ name) { + return getEntry(name); + }, + + getEntryCount: function () { + return _zip.getEntryCount(); + }, + + forEach: function (callback) { + return _zip.forEach(callback); + }, + + /** + * Extracts the given entry to the given targetPath + * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted + * + * @param {string|ZipEntry} entry - ZipEntry object or String with the full path of the entry + * @param {string} targetPath - Target folder where to write the file + * @param {boolean} [maintainEntryPath=true] - If maintainEntryPath is true and the entry is inside a folder, the entry folder will be created in targetPath as well. Default is TRUE + * @param {boolean} [overwrite=false] - If the file already exists at the target path, the file will be overwriten if this is true. + * @param {boolean} [keepOriginalPermission=false] - The file will be set as the permission from the entry if this is true. + * @param {string} [outFileName] - String If set will override the filename of the extracted file (Only works if the entry is a file) + * + * @return Boolean + */ + extractEntryTo: function (entry, targetPath, maintainEntryPath, overwrite, keepOriginalPermission, outFileName) { + overwrite = get_Bool(false, overwrite); + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + maintainEntryPath = get_Bool(true, maintainEntryPath); + outFileName = get_Str(keepOriginalPermission, outFileName); + + var item = getEntry(entry); + if (!item) { + throw Utils.Errors.NO_ENTRY(); + } + + var entryName = canonical(item.entryName); + + var target = sanitize(targetPath, outFileName && !item.isDirectory ? outFileName : maintainEntryPath ? entryName : pth.basename(entryName)); + + if (item.isDirectory) { + var children = _zip.getEntryChildren(item); + children.forEach(function (child) { + if (child.isDirectory) return; + var content = child.getData(); + if (!content) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + var name = canonical(child.entryName); + var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? child.header.fileAttr : undefined; + filetools.writeFileTo(childName, content, overwrite, fileAttr); + }); + return true; + } + + var content = item.getData(_zip.password); + if (!content) throw Utils.Errors.CANT_EXTRACT_FILE(); + + if (filetools.fs.existsSync(target) && !overwrite) { + throw Utils.Errors.CANT_OVERRIDE(); + } + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileTo(target, content, overwrite, fileAttr); + + return true; + }, + + /** + * Test the archive + * @param {string} [pass] + */ + test: function (pass) { + if (!_zip) { + return false; + } + + for (var entry in _zip.entries) { + try { + if (entry.isDirectory) { + continue; + } + var content = _zip.entries[entry].getData(pass); + if (!content) { + return false; + } + } catch (err) { + return false; + } + } + return true; + }, + + /** + * Extracts the entire archive to the given location + * + * @param {string} targetPath Target location + * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. + * Default is FALSE + * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. + * Default is FALSE + * @param {string|Buffer} [pass] password + */ + extractAllTo: function (targetPath, overwrite, keepOriginalPermission, pass) { + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + pass = get_Str(keepOriginalPermission, pass); + overwrite = get_Bool(false, overwrite); + if (!_zip) throw Utils.Errors.NO_ZIP(); + + _zip.entries.forEach(function (entry) { + var entryName = sanitize(targetPath, canonical(entry.entryName)); + if (entry.isDirectory) { + filetools.makeDir(entryName); + return; + } + var content = entry.getData(pass); + if (!content) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileTo(entryName, content, overwrite, fileAttr); + try { + filetools.fs.utimesSync(entryName, entry.header.time, entry.header.time); + } catch (err) { + throw Utils.Errors.CANT_EXTRACT_FILE(); + } + }); + }, + + /** + * Asynchronous extractAllTo + * + * @param {string} targetPath Target location + * @param {boolean} [overwrite=false] If the file already exists at the target path, the file will be overwriten if this is true. + * Default is FALSE + * @param {boolean} [keepOriginalPermission=false] The file will be set as the permission from the entry if this is true. + * Default is FALSE + * @param {function} callback The callback will be executed when all entries are extracted successfully or any error is thrown. + */ + extractAllToAsync: function (targetPath, overwrite, keepOriginalPermission, callback) { + callback = get_Fun(overwrite, keepOriginalPermission, callback); + keepOriginalPermission = get_Bool(false, keepOriginalPermission); + overwrite = get_Bool(false, overwrite); + if (!callback) { + return new Promise((resolve, reject) => { + this.extractAllToAsync(targetPath, overwrite, keepOriginalPermission, function (err) { + if (err) { + reject(err); + } else { + resolve(this); + } + }); + }); + } + if (!_zip) { + callback(Utils.Errors.NO_ZIP()); + return; + } + + targetPath = pth.resolve(targetPath); + // convert entryName to + const getPath = (entry) => sanitize(targetPath, pth.normalize(canonical(entry.entryName))); + const getError = (msg, file) => new Error(msg + ': "' + file + '"'); + + // separate directories from files + const dirEntries = []; + const fileEntries = []; + _zip.entries.forEach((e) => { + if (e.isDirectory) { + dirEntries.push(e); + } else { + fileEntries.push(e); + } + }); + + // Create directory entries first synchronously + // this prevents race condition and assures folders are there before writing files + for (const entry of dirEntries) { + const dirPath = getPath(entry); + // The reverse operation for attr depend on method addFile() + const dirAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + try { + filetools.makeDir(dirPath); + if (dirAttr) filetools.fs.chmodSync(dirPath, dirAttr); + // in unix timestamp will change if files are later added to folder, but still + filetools.fs.utimesSync(dirPath, entry.header.time, entry.header.time); + } catch (er) { + callback(getError("Unable to create folder", dirPath)); + } + } + + fileEntries.reverse().reduce(function (next, entry) { + return function (err) { + if (err) { + next(err); + } else { + const entryName = pth.normalize(canonical(entry.entryName)); + const filePath = sanitize(targetPath, entryName); + entry.getDataAsync(function (content, err_1) { + if (err_1) { + next(err_1); + } else if (!content) { + next(Utils.Errors.CANT_EXTRACT_FILE()); + } else { + // The reverse operation for attr depend on method addFile() + const fileAttr = keepOriginalPermission ? entry.header.fileAttr : undefined; + filetools.writeFileToAsync(filePath, content, overwrite, fileAttr, function (succ) { + if (!succ) { + next(getError("Unable to write file", filePath)); + } + filetools.fs.utimes(filePath, entry.header.time, entry.header.time, function (err_2) { + if (err_2) { + next(getError("Unable to set times", filePath)); + } else { + next(); + } + }); + }); + } + }); + } + }; + }, callback)(); + }, + + /** + * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip + * + * @param {string} targetFileName + * @param {function} callback + */ + writeZip: function (targetFileName, callback) { + if (arguments.length === 1) { + if (typeof targetFileName === "function") { + callback = targetFileName; + targetFileName = ""; + } + } + + if (!targetFileName && opts.filename) { + targetFileName = opts.filename; + } + if (!targetFileName) return; + + var zipData = _zip.compressToBuffer(); + if (zipData) { + var ok = filetools.writeFileTo(targetFileName, zipData, true); + if (typeof callback === "function") callback(!ok ? new Error("failed") : null, ""); } }, - /** - * Asynchronous addLocalFile - * @param localPath - * @param callback - * @param zipPath optional path inside zip - * @param filter optional RegExp or Function if files match will - * be included. - */ - addLocalFolderAsync: function (/*String*/localPath, /*Function*/callback, /*String*/zipPath, /*RegExp|Function*/filter) { - if (filter === undefined) { - filter = function () { - return true; - }; - } else if (filter instanceof RegExp) { - filter = function (filter) { - return function (filename) { - return filter.test(filename); - } - }(filter); - } + /** + * + * @param {string} targetFileName + * @param {object} [props] + * @param {boolean} [props.overwrite=true] If the file already exists at the target path, the file will be overwriten if this is true. + * @param {boolean} [props.perm] The file will be set as the permission from the entry if this is true. - if (zipPath) { - zipPath = zipPath.split("\\").join("/"); - if (zipPath.charAt(zipPath.length - 1) !== "/") { - zipPath += "/"; - } - } else { - zipPath = ""; - } - // normalize the path first - localPath = pth.normalize(localPath); - localPath = localPath.split("\\").join("/"); //windows fix - if (localPath.charAt(localPath.length - 1) !== "/") - localPath += "/"; + * @returns {Promise} + */ + writeZipPromise: function (/**String*/ targetFileName, /* object */ props) { + const { overwrite, perm } = Object.assign({ overwrite: true }, props); - var self = this; - fs.open(localPath, 'r', function (err, fd) { - if (err && err.code === 'ENOENT') { - callback(undefined, Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath)); - } else if (err) { - callback(undefined, err); - } else { - var items = Utils.findFiles(localPath); - var i = -1; + return new Promise((resolve, reject) => { + // find file name + if (!targetFileName && opts.filename) targetFileName = opts.filename; + if (!targetFileName) reject("ADM-ZIP: ZIP File Name Missing"); - var next = function () { - i += 1; - if (i < items.length) { - var p = items[i].split("\\").join("/").replace(new RegExp(localPath.replace(/(\(|\))/g, '\\$1'), 'i'), ""); //windows fix - p = p.normalize('NFD').replace(/[\u0300-\u036f]/g, '').replace(/[^\x20-\x7E]/g, '') // accent fix - if (filter(p)) { - if (p.charAt(p.length - 1) !== "/") { - fs.readFile(items[i], function (err, data) { - if (err) { - callback(undefined, err); - } else { - self.addFile(zipPath + p, data, '', 0); - next(); - } - }) - } else { - self.addFile(zipPath + p, Buffer.alloc(0), "", 0); - next(); - } - } else { - next(); - } + this.toBufferPromise().then((zipData) => { + const ret = (done) => (done ? resolve(done) : reject("ADM-ZIP: Wasn't able to write zip file")); + filetools.writeFileToAsync(targetFileName, zipData, overwrite, perm, ret); + }, reject); + }); + }, - } else { - callback(true, undefined); - } - } + /** + * @returns {Promise} A promise to the Buffer. + */ + toBufferPromise: function () { + return new Promise((resolve, reject) => { + _zip.toAsyncBuffer(resolve, reject); + }); + }, - next(); - } - }); - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile: function (/**String*/entryName, /**Buffer*/content, /**String*/comment, /**Number*/attr) { - // prepare new entry - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - - var isStat = ('object' === typeof attr) && (attr instanceof fs.Stats); - - // last modification time from file stats - if (isStat){ - entry.header.time = attr.mtime; - } - - // Set file attribute - var fileattr = (entry.isDirectory) ? 0x10 : 0; // (MS-DOS directory flag) - - // extended attributes field for Unix - if('win32' !== process.platform){ - // set file type either S_IFDIR / S_IFREG - var unix = (entry.isDirectory) ? 0x4000 : 0x8000; - - if (isStat) { // File attributes from file stats - unix |= (0xfff & attr.mode) - }else if ('number' === typeof attr){ // attr from given attr values - unix |= (0xfff & attr); - }else{ // Default values: - unix |= (entry.isDirectory) ? 0o755 : 0o644; // permissions (drwxr-xr-x) or (-r-wr--r--) - } - - fileattr = (fileattr | (unix << 16)) >>> 0; // add attributes - } - - entry.attr = fileattr; - - entry.setData(content); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries: function () { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry: function (/**String*/name) { - return getEntry(name); - }, - - getEntryCount: function() { - return _zip.getEntryCount(); - }, - - forEach: function(callback) { - return _zip.forEach(callback); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * @param outFileName String If set will override the filename of the extracted file (Only works if the entry is a file) - * - * @return Boolean - */ - extractEntryTo: function (/**Object*/entry, /**String*/targetPath, /**Boolean*/maintainEntryPath, /**Boolean*/overwrite, /**String**/outFileName) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath === "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw new Error(Utils.Errors.NO_ENTRY); - } - - var entryName = canonical(item.entryName); - - var target = sanitize(targetPath,outFileName && !item.isDirectory ? outFileName : (maintainEntryPath ? entryName : pth.basename(entryName))); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function (child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw new Error(Utils.Errors.CANT_EXTRACT_FILE); - } - var name = canonical(child.entryName) - var childName = sanitize(targetPath, maintainEntryPath ? name : pth.basename(name)); - - Utils.writeFileTo(childName, content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw new Error(Utils.Errors.CANT_EXTRACT_FILE); - - if (fs.existsSync(target) && !overwrite) { - throw new Error(Utils.Errors.CANT_OVERRIDE); - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Test the archive - * - */ - test: function (pass) { - if (!_zip) { - return false; - } - - for (var entry in _zip.entries) { - try { - if (entry.isDirectory) { - continue; - } - var content = _zip.entries[entry].getData(pass); - if (!content) { - return false; - } - } catch (err) { - return false; - } - } - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo: function (/**String*/targetPath, /**Boolean*/overwrite, /*String, Buffer*/pass) { - overwrite = overwrite || false; - if (!_zip) { - throw new Error(Utils.Errors.NO_ZIP); - } - _zip.entries.forEach(function (entry) { - var entryName = sanitize(targetPath, canonical(entry.entryName.toString())); - if (entry.isDirectory) { - Utils.makeDir(entryName); - return; - } - var content = entry.getData(pass); - if (!content) { - throw new Error(Utils.Errors.CANT_EXTRACT_FILE); - } - Utils.writeFileTo(entryName, content, overwrite); - try { - fs.utimesSync(entryName, entry.header.time, entry.header.time) - } catch (err) { - throw new Error(Utils.Errors.CANT_EXTRACT_FILE); - } - }) - }, - - /** - * Asynchronous extractAllTo - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * @param callback - */ - extractAllToAsync: function (/**String*/targetPath, /**Boolean*/overwrite, /**Function*/callback) { - if (!callback) { - callback = function() {} - } - overwrite = overwrite || false; - if (!_zip) { - callback(new Error(Utils.Errors.NO_ZIP)); - return; - } - - var entries = _zip.entries; - var i = entries.length; - entries.forEach(function (entry) { - if (i <= 0) return; // Had an error already - - var entryName = pth.normalize(canonical(entry.entryName.toString())); - - if (entry.isDirectory) { - Utils.makeDir(sanitize(targetPath, entryName)); - if (--i === 0) - callback(undefined); - return; - } - entry.getDataAsync(function (content, err) { - if (i <= 0) return; - if (err) { - callback(new Error(err)); - return; - } - if (!content) { - i = 0; - callback(new Error(Utils.Errors.CANT_EXTRACT_FILE)); - return; - } - - Utils.writeFileToAsync(sanitize(targetPath, entryName), content, overwrite, function (succ) { - try { - fs.utimesSync(pth.resolve(targetPath, entryName), entry.header.time, entry.header.time); - } catch (err) { - callback(new Error('Unable to set utimes')); - } - if (i <= 0) return; - if (!succ) { - i = 0; - callback(new Error('Unable to write')); - return; - } - if (--i === 0) - callback(undefined); - }); - }); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - * @param callback - */ - writeZip: function (/**String*/targetFileName, /**Function*/callback) { - if (arguments.length === 1) { - if (typeof targetFileName === "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.compressToBuffer(); - if (zipData) { - var ok = Utils.writeFileTo(targetFileName, zipData, true); - if (typeof callback === 'function') callback(!ok ? new Error("failed") : null, ""); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer: function (/**Function=*/onSuccess, /**Function=*/onFail, /**Function=*/onItemStart, /**Function=*/onItemEnd) { - this.valueOf = 2; - if (typeof onSuccess === "function") { - _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); - return null; - } - return _zip.compressToBuffer() - } - } + /** + * Returns the content of the entire zip file as a Buffer object + * + * @prop {function} [onSuccess] + * @prop {function} [onFail] + * @prop {function} [onItemStart] + * @prop {function} [onItemEnd] + * @returns {Buffer} + */ + toBuffer: function (onSuccess, onFail, onItemStart, onItemEnd) { + if (typeof onSuccess === "function") { + _zip.toAsyncBuffer(onSuccess, onFail, onItemStart, onItemEnd); + return null; + } + return _zip.compressToBuffer(); + } + }; }; /***/ }), -/***/ 9032: +/***/ 3746: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Utils = __nccwpck_require__(5182), +var Utils = __nccwpck_require__(5391), Constants = Utils.Constants; /* The central directory file header */ module.exports = function () { - var _verMade = 0x14, - _version = 0x0A, + var _verMade = 20, // v2.0 + _version = 10, // v1.0 _flags = 0, _method = 0, _time = 0, @@ -8963,51 +12335,78 @@ module.exports = function () { _size = 0, _fnameLen = 0, _extraLen = 0, - _comLen = 0, _diskStart = 0, _inattr = 0, _attr = 0, _offset = 0; - switch(process.platform){ - case 'win32': - _verMade |= 0x0A00; - case 'darwin': - _verMade |= 0x1300; - default: - _verMade |= 0x0300; - } + _verMade |= Utils.isWin ? 0x0a00 : 0x0300; - var _dataHeader = {}; + // Set EFS flag since filename and comment fields are all by default encoded using UTF-8. + // Without it file names may be corrupted for other apps when file names use unicode chars + _flags |= Constants.FLG_EFS; - function setTime(val) { - val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 // b09-16 years from 1980 - | (val.getMonth() + 1) << 21 // b05-08 month - | val.getDate() << 16 // b00-04 hour + const _localHeader = { + extraLen: 0 + }; - // 2 bytes time - | val.getHours() << 11 // b11-15 hour - | val.getMinutes() << 5 // b05-10 minute - | val.getSeconds() >> 1; // b00-04 seconds divided by 2 - } + // casting + const uint32 = (val) => Math.max(0, val) >>> 0; + const uint16 = (val) => Math.max(0, val) & 0xffff; + const uint8 = (val) => Math.max(0, val) & 0xff; - setTime(+new Date()); + _time = Utils.fromDate2DOS(new Date()); return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, + get made() { + return _verMade; + }, + set made(val) { + _verMade = val; + }, - get version () { return _version; }, - set version (val) { _version = val }, + get version() { + return _version; + }, + set version(val) { + _version = val; + }, - get flags () { return _flags }, - set flags (val) { _flags = val; }, + get flags() { + return _flags; + }, + set flags(val) { + _flags = val; + }, - get method () { return _method; }, - set method (val) { - switch (val){ + get flags_efs() { + return (_flags & Constants.FLG_EFS) > 0; + }, + set flags_efs(val) { + if (val) { + _flags |= Constants.FLG_EFS; + } else { + _flags &= ~Constants.FLG_EFS; + } + }, + + get flags_desc() { + return (_flags & Constants.FLG_DESC) > 0; + }, + set flags_desc(val) { + if (val) { + _flags |= Constants.FLG_DESC; + } else { + _flags &= ~Constants.FLG_DESC; + } + }, + + get method() { + return _method; + }, + set method(val) { + switch (val) { case Constants.STORED: this.version = 10; case Constants.DEFLATED: @@ -9015,97 +12414,159 @@ module.exports = function () { this.version = 20; } _method = val; - }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - setTime(val); }, - get crc () { return _crc; }, - set crc (val) { _crc = val; }, + get time() { + return Utils.fromDOS2Date(this.timeval); + }, + set time(val) { + this.timeval = Utils.fromDate2DOS(val); + }, - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, + get timeval() { + return _time; + }, + set timeval(val) { + _time = uint32(val); + }, - get size () { return _size; }, - set size (val) { _size = val; }, + get timeHighByte() { + return uint8(_time >>> 8); + }, + get crc() { + return _crc; + }, + set crc(val) { + _crc = uint32(val); + }, - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, + get compressedSize() { + return _compressedSize; + }, + set compressedSize(val) { + _compressedSize = uint32(val); + }, - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, + get size() { + return _size; + }, + set size(val) { + _size = uint32(val); + }, - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, + get fileNameLength() { + return _fnameLen; + }, + set fileNameLength(val) { + _fnameLen = val; + }, - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, + get extraLength() { + return _extraLen; + }, + set extraLength(val) { + _extraLen = val; + }, - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, + get extraLocalLength() { + return _localHeader.extraLen; + }, + set extraLocalLength(val) { + _localHeader.extraLen = val; + }, - get attr () { return _attr }, - set attr (val) { _attr = val }, + get commentLength() { + return _comLen; + }, + set commentLength(val) { + _comLen = val; + }, - get offset () { return _offset }, - set offset (val) { _offset = val }, + get diskNumStart() { + return _diskStart; + }, + set diskNumStart(val) { + _diskStart = uint32(val); + }, - get encripted () { return (_flags & 1) === 1 }, + get inAttr() { + return _inattr; + }, + set inAttr(val) { + _inattr = uint32(val); + }, - get entryHeaderSize () { + get attr() { + return _attr; + }, + set attr(val) { + _attr = uint32(val); + }, + + // get Unix file permissions + get fileAttr() { + return (_attr || 0) >> 16 & 0xfff; + }, + + get offset() { + return _offset; + }, + set offset(val) { + _offset = uint32(val); + }, + + get encrypted() { + return (_flags & Constants.FLG_ENC) === Constants.FLG_ENC; + }, + + get centralHeaderSize() { return Constants.CENHDR + _fnameLen + _extraLen + _comLen; }, - get realDataOffset () { - return _offset + Constants.LOCHDR + _dataHeader.fnameLen + _dataHeader.extraLen; + get realDataOffset() { + return _offset + Constants.LOCHDR + _localHeader.fnameLen + _localHeader.extraLen; }, - get dataHeader () { - return _dataHeader; + get localHeader() { + return _localHeader; }, - loadDataHeaderFromBinary : function(/*Buffer*/input) { + loadLocalHeaderFromBinary: function (/*Buffer*/ input) { var data = input.slice(_offset, _offset + Constants.LOCHDR); // 30 bytes and should start with "PK\003\004" if (data.readUInt32LE(0) !== Constants.LOCSIG) { - throw new Error(Utils.Errors.INVALID_LOC); - } - _dataHeader = { - // version needed to extract - version : data.readUInt16LE(Constants.LOCVER), - // general purpose bit flag - flags : data.readUInt16LE(Constants.LOCFLG), - // compression method - method : data.readUInt16LE(Constants.LOCHOW), - // modification time (2 bytes time, 2 bytes date) - time : data.readUInt32LE(Constants.LOCTIM), - // uncompressed file crc-32 value - crc : data.readUInt32LE(Constants.LOCCRC), - // compressed size - compressedSize : data.readUInt32LE(Constants.LOCSIZ), - // uncompressed size - size : data.readUInt32LE(Constants.LOCLEN), - // filename length - fnameLen : data.readUInt16LE(Constants.LOCNAM), - // extra field length - extraLen : data.readUInt16LE(Constants.LOCEXT) + throw Utils.Errors.INVALID_LOC(); } + + // version needed to extract + _localHeader.version = data.readUInt16LE(Constants.LOCVER); + // general purpose bit flag + _localHeader.flags = data.readUInt16LE(Constants.LOCFLG); + // compression method + _localHeader.method = data.readUInt16LE(Constants.LOCHOW); + // modification time (2 bytes time, 2 bytes date) + _localHeader.time = data.readUInt32LE(Constants.LOCTIM); + // uncompressed file crc-32 valu + _localHeader.crc = data.readUInt32LE(Constants.LOCCRC); + // compressed size + _localHeader.compressedSize = data.readUInt32LE(Constants.LOCSIZ); + // uncompressed size + _localHeader.size = data.readUInt32LE(Constants.LOCLEN); + // filename length + _localHeader.fnameLen = data.readUInt16LE(Constants.LOCNAM); + // extra field length + _localHeader.extraLen = data.readUInt16LE(Constants.LOCEXT); + + // read extra data + const extraStart = _offset + Constants.LOCHDR + _localHeader.fnameLen; + const extraEnd = extraStart + _localHeader.extraLen; + return input.slice(extraStart, extraEnd); }, - loadFromBinary : function(/*Buffer*/data) { + loadFromBinary: function (/*Buffer*/ data) { // data should be 46 bytes and start with "PK 01 02" if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) { - throw new Error(Utils.Errors.INVALID_CEN); + throw Utils.Errors.INVALID_CEN(); } // version made by _verMade = data.readUInt16LE(Constants.CENVEM); @@ -9139,7 +12600,7 @@ module.exports = function () { _offset = data.readUInt32LE(Constants.CENOFF); }, - dataHeaderToBinary : function() { + localHeaderToBinary: function () { // LOC header size (30 bytes) var data = Buffer.alloc(Constants.LOCHDR); // "PK\003\004" @@ -9161,11 +12622,11 @@ module.exports = function () { // filename length data.writeUInt16LE(_fnameLen, Constants.LOCNAM); // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); + data.writeUInt16LE(_localHeader.extraLen, Constants.LOCEXT); return data; }, - entryHeaderToBinary : function() { + centralHeaderToBinary: function () { // CEN header size (46 bytes) var data = Buffer.alloc(Constants.CENHDR + _fnameLen + _extraLen + _comLen); // "PK\001\002" @@ -9200,50 +12661,56 @@ module.exports = function () { data.writeUInt32LE(_attr, Constants.CENATX); // LOC header offset data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); return data; }, - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + this.time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; + toJSON: function () { + const bytes = function (nr) { + return nr + " bytes"; + }; + + return { + made: _verMade, + version: _version, + flags: _flags, + method: Utils.methodToString(_method), + time: this.time, + crc: "0x" + _crc.toString(16).toUpperCase(), + compressedSize: bytes(_compressedSize), + size: bytes(_size), + fileNameLength: bytes(_fnameLen), + extraLength: bytes(_extraLen), + commentLength: bytes(_comLen), + diskNumStart: _diskStart, + inAttr: _inattr, + attr: _attr, + offset: _offset, + centralHeaderSize: bytes(Constants.CENHDR + _fnameLen + _extraLen + _comLen) + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); } - } + }; }; /***/ }), -/***/ 4958: +/***/ 1907: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.EntryHeader = __nccwpck_require__(9032); -exports.MainHeader = __nccwpck_require__(4408); +exports.EntryHeader = __nccwpck_require__(3746); +exports.MainHeader = __nccwpck_require__(9311); /***/ }), -/***/ 4408: +/***/ 9311: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Utils = __nccwpck_require__(5182), +var Utils = __nccwpck_require__(5391), Constants = Utils.Constants; /* The entries in the end of central directory */ @@ -9255,32 +12722,53 @@ module.exports = function () { _commentLength = 0; return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, + get diskEntries() { + return _volumeEntries; + }, + set diskEntries(/*Number*/ val) { + _volumeEntries = _totalEntries = val; + }, - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, + get totalEntries() { + return _totalEntries; + }, + set totalEntries(/*Number*/ val) { + _totalEntries = _volumeEntries = val; + }, - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, + get size() { + return _size; + }, + set size(/*Number*/ val) { + _size = val; + }, - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, + get offset() { + return _offset; + }, + set offset(/*Number*/ val) { + _offset = val; + }, - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, + get commentLength() { + return _commentLength; + }, + set commentLength(/*Number*/ val) { + _commentLength = val; + }, - get mainHeaderSize () { + get mainHeaderSize() { return Constants.ENDHDR + _commentLength; }, - loadFromBinary : function(/*Buffer*/data) { + loadFromBinary: function (/*Buffer*/ data) { // data should be 22 bytes and start with "PK 05 06" // or be 56+ bytes and start with "PK 06 06" for Zip64 - if ((data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && - (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG)) { - - throw new Error(Utils.Errors.INVALID_END); + if ( + (data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) && + (data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG) + ) { + throw Utils.Errors.INVALID_END(); } if (data.readUInt32LE(0) === Constants.ENDSIG) { @@ -9300,17 +12788,16 @@ module.exports = function () { // total number of entries _totalEntries = Utils.readBigUInt64LE(data, Constants.ZIP64TOT); // central directory size in bytes - _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZ); + _size = Utils.readBigUInt64LE(data, Constants.ZIP64SIZE); // offset of first CEN header _offset = Utils.readBigUInt64LE(data, Constants.ZIP64OFF); _commentLength = 0; } - }, - toBinary : function() { - var b = Buffer.alloc(Constants.ENDHDR + _commentLength); + toBinary: function () { + var b = Buffer.alloc(Constants.ENDHDR + _commentLength); // "PK 05 06" signature b.writeUInt32LE(Constants.ENDSIG, 0); b.writeUInt32LE(0, 4); @@ -9330,188 +12817,308 @@ module.exports = function () { return b; }, - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; + toJSON: function () { + // creates 0x0000 style output + const offset = function (nr, len) { + let offs = nr.toString(16).toUpperCase(); + while (offs.length < len) offs = "0" + offs; + return "0x" + offs; + }; + + return { + diskEntries: _volumeEntries, + totalEntries: _totalEntries, + size: _size + " bytes", + offset: offset(_offset, 4), + commentLength: _commentLength + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); } - } + }; }; +// Misspelled + /***/ }), -/***/ 7686: +/***/ 5120: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = function (/*Buffer*/inbuf) { +module.exports = function (/*Buffer*/ inbuf) { + var zlib = __nccwpck_require__(3106); - var zlib = __nccwpck_require__(8761); - - var opts = {chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024}; - - return { - deflate: function () { - return zlib.deflateRawSync(inbuf, opts); - }, + var opts = { chunkSize: (parseInt(inbuf.length / 1024) + 1) * 1024 }; - deflateAsync: function (/*Function*/callback) { - var tmp = zlib.createDeflateRaw(opts), parts = [], total = 0; - tmp.on('data', function (data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function () { - var buf = Buffer.alloc(total), written = 0; - buf.fill(0); - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; + return { + deflate: function () { + return zlib.deflateRawSync(inbuf, opts); + }, + + deflateAsync: function (/*Function*/ callback) { + var tmp = zlib.createDeflateRaw(opts), + parts = [], + total = 0; + tmp.on("data", function (data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function () { + var buf = Buffer.alloc(total), + written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } + }; }; /***/ }), -/***/ 3928: +/***/ 3667: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.Deflater = __nccwpck_require__(7686); -exports.Inflater = __nccwpck_require__(2153); -exports.ZipCrypto = __nccwpck_require__(3228); +exports.Deflater = __nccwpck_require__(5120); +exports.Inflater = __nccwpck_require__(9540); +exports.ZipCrypto = __nccwpck_require__(2689); + /***/ }), -/***/ 2153: +/***/ 9540: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = function (/*Buffer*/inbuf) { +const version = +(process.versions ? process.versions.node : "").split(".")[0] || 0; - var zlib = __nccwpck_require__(8761); +module.exports = function (/*Buffer*/ inbuf, /*number*/ expectedLength) { + var zlib = __nccwpck_require__(3106); + const option = version >= 15 && expectedLength > 0 ? { maxOutputLength: expectedLength } : {}; - return { - inflate: function () { - return zlib.inflateRawSync(inbuf); - }, + return { + inflate: function () { + return zlib.inflateRawSync(inbuf, option); + }, - inflateAsync: function (/*Function*/callback) { - var tmp = zlib.createInflateRaw(), parts = [], total = 0; - tmp.on('data', function (data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function () { - var buf = Buffer.alloc(total), written = 0; - buf.fill(0); - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; + inflateAsync: function (/*Function*/ callback) { + var tmp = zlib.createInflateRaw(option), + parts = [], + total = 0; + tmp.on("data", function (data) { + parts.push(data); + total += data.length; + }); + tmp.on("end", function () { + var buf = Buffer.alloc(total), + written = 0; + buf.fill(0); + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + part.copy(buf, written); + written += part.length; + } + callback && callback(buf); + }); + tmp.end(inbuf); } - callback && callback(buf); - }); - tmp.end(inbuf); - } - } + }; }; /***/ }), -/***/ 3228: -/***/ ((module) => { +/***/ 2689: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// node crypt, we use it for generate salt +// eslint-disable-next-line node/no-unsupported-features/node-builtins +const { randomFillSync } = __nccwpck_require__(6982); +const Errors = __nccwpck_require__(6232); // generate CRC32 lookup table -const crctable = (new Uint32Array(256)).map((t,crc)=>{ - for(let j=0;j<8;j++){ - if (0 !== (crc & 1)){ - crc = (crc >>> 1) ^ 0xEDB88320 - }else{ - crc >>>= 1 +const crctable = new Uint32Array(256).map((t, crc) => { + for (let j = 0; j < 8; j++) { + if (0 !== (crc & 1)) { + crc = (crc >>> 1) ^ 0xedb88320; + } else { + crc >>>= 1; } } - return crc>>>0; + return crc >>> 0; }); -function make_decrypter(/*Buffer*/pwd){ - // C-style uInt32 Multiply - const uMul = (a,b) => Math.imul(a, b) >>> 0; - // Initialize keys with default values - const keys = new Uint32Array([0x12345678, 0x23456789, 0x34567890]); - // crc32 byte update - const crc32update = (pCrc32, bval) => { - return crctable[(pCrc32 ^ bval) & 0xff] ^ (pCrc32 >>> 8); - } - // update keys with byteValues - const updateKeys = (byteValue) => { - keys[0] = crc32update(keys[0], byteValue); - keys[1] += keys[0] & 0xff; - keys[1] = uMul(keys[1], 134775813) + 1; - keys[2] = crc32update(keys[2], keys[1] >>> 24); - } +// C-style uInt32 Multiply (discards higher bits, when JS multiply discards lower bits) +const uMul = (a, b) => Math.imul(a, b) >>> 0; - // 1. Stage initialize key - const pass = (Buffer.isBuffer(pwd)) ? pwd : Buffer.from(pwd); - for(let i=0; i< pass.length; i++){ - updateKeys(pass[i]); +// crc32 byte single update (actually same function is part of utils.crc32 function :) ) +const crc32update = (pCrc32, bval) => { + return crctable[(pCrc32 ^ bval) & 0xff] ^ (pCrc32 >>> 8); +}; + +// function for generating salt for encrytion header +const genSalt = () => { + if ("function" === typeof randomFillSync) { + return randomFillSync(Buffer.alloc(12)); + } else { + // fallback if function is not defined + return genSalt.node(); } +}; + +// salt generation with node random function (mainly as fallback) +genSalt.node = () => { + const salt = Buffer.alloc(12); + const len = salt.length; + for (let i = 0; i < len; i++) salt[i] = (Math.random() * 256) & 0xff; + return salt; +}; + +// general config +const config = { + genSalt +}; + +// Class Initkeys handles same basic ops with keys +function Initkeys(pw) { + const pass = Buffer.isBuffer(pw) ? pw : Buffer.from(pw); + this.keys = new Uint32Array([0x12345678, 0x23456789, 0x34567890]); + for (let i = 0; i < pass.length; i++) { + this.updateKeys(pass[i]); + } +} + +Initkeys.prototype.updateKeys = function (byteValue) { + const keys = this.keys; + keys[0] = crc32update(keys[0], byteValue); + keys[1] += keys[0] & 0xff; + keys[1] = uMul(keys[1], 134775813) + 1; + keys[2] = crc32update(keys[2], keys[1] >>> 24); + return byteValue; +}; + +Initkeys.prototype.next = function () { + const k = (this.keys[2] | 2) >>> 0; // key + return (uMul(k, k ^ 1) >> 8) & 0xff; // decode +}; + +function make_decrypter(/*Buffer*/ pwd) { + // 1. Stage initialize key + const keys = new Initkeys(pwd); // return decrypter function - return function (/*Buffer*/data){ - if (!Buffer.isBuffer(data)){ - throw 'decrypter needs Buffer' - } + return function (/*Buffer*/ data) { // result - we create new Buffer for results const result = Buffer.alloc(data.length); let pos = 0; // process input data - for(let c of data){ - const k = (keys[2] | 2) >>> 0; // key - c ^= (uMul(k, k^1) >> 8) & 0xff; // decode - result[pos++] = c; // Save Value - updateKeys(c); // update keys with decoded byte + for (let c of data) { + //c ^= keys.next(); + //result[pos++] = c; // decode & Save Value + result[pos++] = keys.updateKeys(c ^ keys.next()); // update keys with decoded byte } return result; - } + }; } -function decrypt(/*Buffer*/ data, /*Object*/header, /*String, Buffer*/ pwd){ +function make_encrypter(/*Buffer*/ pwd) { + // 1. Stage initialize key + const keys = new Initkeys(pwd); + + // return encrypting function, result and pos is here so we dont have to merge buffers later + return function (/*Buffer*/ data, /*Buffer*/ result, /* Number */ pos = 0) { + // result - we create new Buffer for results + if (!result) result = Buffer.alloc(data.length); + // process input data + for (let c of data) { + const k = keys.next(); // save key byte + result[pos++] = c ^ k; // save val + keys.updateKeys(c); // update keys with decoded byte + } + return result; + }; +} + +function decrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd) { if (!data || !Buffer.isBuffer(data) || data.length < 12) { return Buffer.alloc(0); } - - // We Initialize and generate decrypting function + + // 1. We Initialize and generate decrypting function const decrypter = make_decrypter(pwd); - // check - for testing password - const check = header.crc >>> 24; - // decrypt salt what is always 12 bytes and is a part of file content - const testbyte = decrypter(data.slice(0, 12))[11]; + // 2. decrypt salt what is always 12 bytes and is a part of file content + const salt = decrypter(data.slice(0, 12)); - // does password meet expectations - if (check !== testbyte){ - throw 'ADM-ZIP: Wrong Password'; + // if bit 3 (0x08) of the general-purpose flags field is set, check salt[11] with the high byte of the header time + // 2 byte data block (as per Info-Zip spec), otherwise check with the high byte of the header entry + const verifyByte = (header.flags & 0x8) === 0x8 ? header.timeHighByte : header.crc >>> 24; + + //3. does password meet expectations + if (salt[11] !== verifyByte) { + throw Errors.WRONG_PASSWORD(); } - // decode content + // 4. decode content return decrypter(data.slice(12)); } -module.exports = {decrypt}; +// lets add way to populate salt, NOT RECOMMENDED for production but maybe useful for testing general functionality +function _salter(data) { + if (Buffer.isBuffer(data) && data.length >= 12) { + // be aware - currently salting buffer data is modified + config.genSalt = function () { + return data.slice(0, 12); + }; + } else if (data === "node") { + // test salt generation with node random function + config.genSalt = genSalt.node; + } else { + // if value is not acceptable config gets reset. + config.genSalt = genSalt; + } +} + +function encrypt(/*Buffer*/ data, /*Object*/ header, /*String, Buffer*/ pwd, /*Boolean*/ oldlike = false) { + // 1. test data if data is not Buffer we make buffer from it + if (data == null) data = Buffer.alloc(0); + // if data is not buffer be make buffer from it + if (!Buffer.isBuffer(data)) data = Buffer.from(data.toString()); + + // 2. We Initialize and generate encrypting function + const encrypter = make_encrypter(pwd); + + // 3. generate salt (12-bytes of random data) + const salt = config.genSalt(); + salt[11] = (header.crc >>> 24) & 0xff; + + // old implementations (before PKZip 2.04g) used two byte check + if (oldlike) salt[10] = (header.crc >>> 16) & 0xff; + + // 4. create output + const result = Buffer.alloc(data.length + 12); + encrypter(salt, result); + + // finally encode content + return encrypter(data, result, 12); +} + +module.exports = { decrypt, encrypt, _salter }; /***/ }), -/***/ 4522: +/***/ 2834: /***/ ((module) => { module.exports = { @@ -9591,32 +13198,39 @@ module.exports = { REDUCED3 : 4, // reduced with compression factor 3 REDUCED4 : 5, // reduced with compression factor 4 IMPLODED : 6, // imploded - // 7 reserved + // 7 reserved for Tokenizing compression algorithm DEFLATED : 8, // deflated ENHANCED_DEFLATED: 9, // enhanced deflated PKWARE : 10,// PKWare DCL imploded - // 11 reserved + // 11 reserved by PKWARE BZIP2 : 12, // compressed using BZIP2 - // 13 reserved + // 13 reserved by PKWARE LZMA : 14, // LZMA - // 15-17 reserved + // 15-17 reserved by PKWARE IBM_TERSE : 18, // compressed using IBM TERSE - IBM_LZ77 : 19, //IBM LZ77 z + IBM_LZ77 : 19, // IBM LZ77 z + AES_ENCRYPT : 99, // WinZIP AES encryption method /* General purpose bit flag */ - FLG_ENC : 0, // encripted file - FLG_COMP1 : 1, // compression option - FLG_COMP2 : 2, // compression option - FLG_DESC : 4, // data descriptor - FLG_ENH : 8, // enhanced deflation - FLG_STR : 16, // strong encryption - FLG_LNG : 1024, // language encoding + // values can obtained with expression 2**bitnr + FLG_ENC : 1, // Bit 0: encrypted file + FLG_COMP1 : 2, // Bit 1, compression option + FLG_COMP2 : 4, // Bit 2, compression option + FLG_DESC : 8, // Bit 3, data descriptor + FLG_ENH : 16, // Bit 4, enhanced deflating + FLG_PATCH : 32, // Bit 5, indicates that the file is compressed patched data. + FLG_STR : 64, // Bit 6, strong encryption (patented) + // Bits 7-10: Currently unused. + FLG_EFS : 2048, // Bit 11: Language encoding flag (EFS) + // Bit 12: Reserved by PKWARE for enhanced compression. + // Bit 13: encrypted the Central Directory (patented). + // Bits 14-15: Reserved by PKWARE. FLG_MSK : 4096, // mask header values /* Load type */ - FILE : 0, + FILE : 2, BUFFER : 1, - NONE : 2, + NONE : 0, /* 4.5 Extensible data fields */ EF_ID : 0, @@ -9653,71 +13267,107 @@ module.exports = { /***/ }), -/***/ 1255: +/***/ 1579: /***/ ((module) => { module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" + efs: true, + encode: (data) => Buffer.from(data, "utf8"), + decode: (data) => data.toString("utf8") }; + /***/ }), -/***/ 8321: +/***/ 6232: +/***/ ((__unused_webpack_module, exports) => { + +const errors = { + /* Header error messages */ + INVALID_LOC: "Invalid LOC header (bad signature)", + INVALID_CEN: "Invalid CEN header (bad signature)", + INVALID_END: "Invalid END header (bad signature)", + + /* Descriptor */ + DESCRIPTOR_NOT_EXIST: "No descriptor present", + DESCRIPTOR_UNKNOWN: "Unknown descriptor format", + DESCRIPTOR_FAULTY: "Descriptor data is malformed", + + /* ZipEntry error messages*/ + NO_DATA: "Nothing to decompress", + BAD_CRC: "CRC32 checksum failed {0}", + FILE_IN_THE_WAY: "There is a file in the way: {0}", + UNKNOWN_METHOD: "Invalid/unsupported compression method", + + /* Inflater error messages */ + AVAIL_DATA: "inflate::Available inflate data did not terminate", + INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block", + TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes", + INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths", + INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length", + INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete", + INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths", + INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths", + INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement", + INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)", + + /* ADM-ZIP error messages */ + CANT_EXTRACT_FILE: "Could not extract the file", + CANT_OVERRIDE: "Target file already exists", + DISK_ENTRY_TOO_LARGE: "Number of disk entries is too large", + NO_ZIP: "No zip file was loaded", + NO_ENTRY: "Entry doesn't exist", + DIRECTORY_CONTENT_ERROR: "A directory cannot have content", + FILE_NOT_FOUND: 'File not found: "{0}"', + NOT_IMPLEMENTED: "Not implemented", + INVALID_FILENAME: "Invalid filename", + INVALID_FORMAT: "Invalid or unsupported zip format. No END header found", + INVALID_PASS_PARAM: "Incompatible password parameter", + WRONG_PASSWORD: "Wrong Password", + + /* ADM-ZIP */ + COMMENT_TOO_LONG: "Comment is too long", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space) + EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error" +}; + +// template +function E(message) { + return function (...args) { + if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number + message = message.replace(/\{(\d)\}/g, (_, n) => args[n] || ''); + } + + return new Error('ADM-ZIP: ' + message); + }; +} + +// Init errors with template +for (const msg of Object.keys(errors)) { + exports[msg] = E(errors[msg]); +} + + +/***/ }), + +/***/ 38: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var fs = __nccwpck_require__(2895).require(), - pth = __nccwpck_require__(5622); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { +const pth = __nccwpck_require__(6928); +module.exports = function (/*String*/ path, /*Utils object*/ { fs }) { var _path = path || "", - _permissions = 0, _obj = newAttr(), _stat = null; function newAttr() { return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } + directory: false, + readonly: false, + hidden: false, + executable: false, + mtime: 0, + atime: 0 + }; } if (_path && fs.existsSync(_path)) { @@ -9725,368 +13375,504 @@ module.exports = function(/*String*/path) { _obj.directory = _stat.isDirectory(); _obj.mtime = _stat.mtime; _obj.atime = _stat.atime; - _obj.executable = (0o111 & _stat.mode) != 0; // file is executable who ever har right not just owner - _obj.readonly = (0o200 & _stat.mode) == 0; // readonly if owner has no write right + _obj.executable = (0o111 & _stat.mode) !== 0; // file is executable who ever har right not just owner + _obj.readonly = (0o200 & _stat.mode) === 0; // readonly if owner has no write right _obj.hidden = pth.basename(_path)[0] === "."; } else { - console.warn("Invalid path: " + _path) + console.warn("Invalid path: " + _path); } return { - - get directory () { + get directory() { return _obj.directory; }, - get readOnly () { + get readOnly() { return _obj.readonly; }, - get hidden () { + get hidden() { return _obj.hidden; }, - get mtime () { + get mtime() { return _obj.mtime; }, - get atime () { - return _obj.atime; + get atime() { + return _obj.atime; }, - - get executable () { + get executable() { return _obj.executable; }, - decodeAttributes : function(val) { + decodeAttributes: function () {}, + encodeAttributes: function () {}, + + toJSON: function () { + return { + path: _path, + isDirectory: _obj.directory, + isReadOnly: _obj.readonly, + isHidden: _obj.hidden, + isExecutable: _obj.executable, + mTime: _obj.mtime, + aTime: _obj.atime + }; }, - encodeAttributes : function (val) { + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; - }, - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; +/***/ }), + +/***/ 5391: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(9066); +module.exports.Constants = __nccwpck_require__(2834); +module.exports.Errors = __nccwpck_require__(6232); +module.exports.FileAttr = __nccwpck_require__(38); +module.exports.decoder = __nccwpck_require__(1579); + + +/***/ }), + +/***/ 9066: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fsystem = __nccwpck_require__(9896); +const pth = __nccwpck_require__(6928); +const Constants = __nccwpck_require__(2834); +const Errors = __nccwpck_require__(6232); +const isWin = typeof process === "object" && "win32" === process.platform; + +const is_Obj = (obj) => typeof obj === "object" && obj !== null; + +// generate CRC32 lookup table +const crcTable = new Uint32Array(256).map((t, c) => { + for (let k = 0; k < 8; k++) { + if ((c & 1) !== 0) { + c = 0xedb88320 ^ (c >>> 1); + } else { + c >>>= 1; } } + return c >>> 0; +}); -}; +// UTILS functions +function Utils(opts) { + this.sep = pth.sep; + this.fs = fsystem; -/***/ }), + if (is_Obj(opts)) { + // custom filesystem + if (is_Obj(opts.fs) && typeof opts.fs.statSync === "function") { + this.fs = opts.fs; + } + } +} -/***/ 2895: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +module.exports = Utils; -exports.require = function() { - var fs = __nccwpck_require__(5747); - if (process && process.versions && process.versions['electron']) { - try { - originalFs = __nccwpck_require__(2941); - if (Object.keys(originalFs).length > 0) { - fs = originalFs; - } - } catch (e) {} - } - return fs -}; +// INSTANTIABLE functions +Utils.prototype.makeDir = function (/*String*/ folder) { + const self = this; -/***/ }), - -/***/ 5182: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(1291); -module.exports.FileSystem = __nccwpck_require__(2895); -module.exports.Constants = __nccwpck_require__(4522); -module.exports.Errors = __nccwpck_require__(1255); -module.exports.FileAttr = __nccwpck_require__(8321); - -/***/ }), - -/***/ 1291: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var fs = __nccwpck_require__(2895).require(), - pth = __nccwpck_require__(5622); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = __nccwpck_require__(4522), - Errors = __nccwpck_require__(1255), - - PATH_SEPARATOR = pth.sep; - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) === ":") return; - resolvedPath += PATH_SEPARATOR + name; + // Sync - make directories tree + function mkdirSync(/*String*/ fpath) { + let resolvedPath = fpath.split(self.sep)[0]; + fpath.split(self.sep).forEach(function (name) { + if (!name || name.substr(-1, 1) === ":") return; + resolvedPath += self.sep + name; var stat; try { - stat = fs.statSync(resolvedPath); + stat = self.fs.statSync(resolvedPath); } catch (e) { - fs.mkdirSync(resolvedPath); + self.fs.mkdirSync(resolvedPath); } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); + if (stat && stat.isFile()) throw Errors.FILE_IN_THE_WAY(`"${resolvedPath}"`); }); } - function findSync(/*String*/dir, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; + mkdirSync(folder); +}; + +Utils.prototype.writeFileTo = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr) { + const self = this; + if (self.fs.existsSync(path)) { + if (!overwrite) return false; // cannot overwrite + + var stat = self.fs.statSync(path); + if (stat.isDirectory()) { + return false; } - var files = []; - fs.readdirSync(dir).forEach(function(file) { - var path = pth.join(dir, file); + } + var folder = pth.dirname(path); + if (!self.fs.existsSync(folder)) { + self.makeDir(folder); + } - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); + var fd; + try { + fd = self.fs.openSync(path, "w", 0o666); // 0666 + } catch (e) { + self.fs.chmodSync(path, 0o666); + fd = self.fs.openSync(path, "w", 0o666); + } + if (fd) { + try { + self.fs.writeSync(fd, content, 0, content.length, 0); + } finally { + self.fs.closeSync(fd); + } + } + self.fs.chmodSync(path, attr || 0o666); + return true; +}; - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); +Utils.prototype.writeFileToAsync = function (/*String*/ path, /*Buffer*/ content, /*Boolean*/ overwrite, /*Number*/ attr, /*Function*/ callback) { + if (typeof attr === "function") { + callback = attr; + attr = undefined; + } + + const self = this; + + self.fs.exists(path, function (exist) { + if (exist && !overwrite) return callback(false); + + self.fs.stat(path, function (err, stat) { + if (exist && stat.isDirectory()) { + return callback(false); } + var folder = pth.dirname(path); + self.fs.exists(folder, function (exists) { + if (!exists) self.makeDir(folder); + + self.fs.open(path, "w", 0o666, function (err, fd) { + if (err) { + self.fs.chmod(path, 0o666, function () { + self.fs.open(path, "w", 0o666, function (err, fd) { + self.fs.write(fd, content, 0, content.length, 0, function () { + self.fs.close(fd, function () { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + }); + }); + }); + }); + } else if (fd) { + self.fs.write(fd, content, 0, content.length, 0, function () { + self.fs.close(fd, function () { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + }); + }); + } else { + self.fs.chmod(path, attr || 0o666, function () { + callback(true); + }); + } + }); + }); + }); + }); +}; + +Utils.prototype.findFiles = function (/*String*/ path) { + const self = this; + + function findSync(/*String*/ dir, /*RegExp*/ pattern, /*Boolean*/ recursive) { + if (typeof pattern === "boolean") { + recursive = pattern; + pattern = undefined; + } + let files = []; + self.fs.readdirSync(dir).forEach(function (file) { + const path = pth.join(dir, file); + const stat = self.fs.statSync(path); + + if (!pattern || pattern.test(path)) { + files.push(pth.normalize(path) + (stat.isDirectory() ? self.sep : "")); + } + + if (stat.isDirectory() && recursive) files = files.concat(findSync(path, pattern, recursive)); }); return files; } - function readBigUInt64LE(/*Buffer*/buffer, /*int*/index) { - var slice = Buffer.from(buffer.slice(index, index + 8)); - slice.swap64(); + return findSync(path, undefined, true); +}; - return parseInt(`0x${ slice.toString('hex') }`); - } +/** + * Callback for showing if everything was done. + * + * @callback filelistCallback + * @param {Error} err - Error object + * @param {string[]} list - was request fully completed + */ - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - if (typeof buf === 'string') { - buf = Buffer.alloc(buf.length, buf); - } - var b = Buffer.alloc(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) !== 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')'; - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwrite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 438); // 0666 - } catch(e) { - fs.chmodSync(path, 438); - fd = fs.openSync(path, 'w', 438); - } - if (fd) { - try { - fs.writeSync(fd, content, 0, content.length, 0); - } - catch (e){ - throw e; - } - finally { - fs.closeSync(fd); - } - } - fs.chmodSync(path, attr || 438); - return true; - }, - - writeFileToAsync : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr, /*Function*/callback) { - if(typeof attr === 'function') { - callback = attr; - attr = undefined; - } - - fs.exists(path, function(exists) { - if(exists && !overwrite) - return callback(false); - - fs.stat(path, function(err, stat) { - if(exists &&stat.isDirectory()) { - return callback(false); - } - - var folder = pth.dirname(path); - fs.exists(folder, function(exists) { - if(!exists) - mkdirSync(folder); - - fs.open(path, 'w', 438, function(err, fd) { - if(err) { - fs.chmod(path, 438, function() { - fs.open(path, 'w', 438, function(err, fd) { - fs.write(fd, content, 0, content.length, 0, function() { - fs.close(fd, function() { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - }); - }); - }); - }) - } else { - if(fd) { - fs.write(fd, content, 0, content.length, 0, function() { - fs.close(fd, function() { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - }); - }); - } else { - fs.chmod(path, attr || 438, function() { - callback(true); - }) - } - } +/** + * + * @param {string} dir + * @param {filelistCallback} cb + */ +Utils.prototype.findFilesAsync = function (dir, cb) { + const self = this; + let results = []; + self.fs.readdir(dir, function (err, list) { + if (err) return cb(err); + let list_length = list.length; + if (!list_length) return cb(null, results); + list.forEach(function (file) { + file = pth.join(dir, file); + self.fs.stat(file, function (err, stat) { + if (err) return cb(err); + if (stat) { + results.push(pth.normalize(file) + (stat.isDirectory() ? self.sep : "")); + if (stat.isDirectory()) { + self.findFilesAsync(file, function (err, res) { + if (err) return cb(err); + results = results.concat(res); + if (!--list_length) cb(null, results); }); - }) - }) - }) - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - toBuffer : function(input) { - if (Buffer.isBuffer(input)) { - return input; - } else { - if (input.length === 0) { - return Buffer.alloc(0) + } else { + if (!--list_length) cb(null, results); + } } - return Buffer.from(input, 'utf8'); - } - }, + }); + }); + }); +}; - readBigUInt64LE, +Utils.prototype.getAttributes = function () {}; - Constants : Constants, - Errors : Errors +Utils.prototype.setAttributes = function () {}; + +// STATIC functions + +// crc32 single update (it is part of crc32) +Utils.crc32update = function (crc, byte) { + return crcTable[(crc ^ byte) & 0xff] ^ (crc >>> 8); +}; + +Utils.crc32 = function (buf) { + if (typeof buf === "string") { + buf = Buffer.from(buf, "utf8"); } -})(); + + let len = buf.length; + let crc = ~0; + for (let off = 0; off < len; ) crc = Utils.crc32update(crc, buf[off++]); + // xor and cast as uint32 number + return ~crc >>> 0; +}; + +Utils.methodToString = function (/*Number*/ method) { + switch (method) { + case Constants.STORED: + return "STORED (" + method + ")"; + case Constants.DEFLATED: + return "DEFLATED (" + method + ")"; + default: + return "UNSUPPORTED (" + method + ")"; + } +}; + +/** + * removes ".." style path elements + * @param {string} path - fixable path + * @returns string - fixed filepath + */ +Utils.canonical = function (/*string*/ path) { + if (!path) return ""; + // trick normalize think path is absolute + const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); + return pth.join(".", safeSuffix); +}; + +/** + * fix file names in achive + * @param {string} path - fixable path + * @returns string - fixed filepath + */ + +Utils.zipnamefix = function (path) { + if (!path) return ""; + // trick normalize think path is absolute + const safeSuffix = pth.posix.normalize("/" + path.split("\\").join("/")); + return pth.posix.join(".", safeSuffix); +}; + +/** + * + * @param {Array} arr + * @param {function} callback + * @returns + */ +Utils.findLast = function (arr, callback) { + if (!Array.isArray(arr)) throw new TypeError("arr is not array"); + + const len = arr.length >>> 0; + for (let i = len - 1; i >= 0; i--) { + if (callback(arr[i], i, arr)) { + return arr[i]; + } + } + return void 0; +}; + +// make abolute paths taking prefix as root folder +Utils.sanitize = function (/*string*/ prefix, /*string*/ name) { + prefix = pth.resolve(pth.normalize(prefix)); + var parts = name.split("/"); + for (var i = 0, l = parts.length; i < l; i++) { + var path = pth.normalize(pth.join(prefix, parts.slice(i, l).join(pth.sep))); + if (path.indexOf(prefix) === 0) { + return path; + } + } + return pth.normalize(pth.join(prefix, pth.basename(name))); +}; + +// converts buffer, Uint8Array, string types to buffer +Utils.toBuffer = function toBuffer(/*buffer, Uint8Array, string*/ input, /* function */ encoder) { + if (Buffer.isBuffer(input)) { + return input; + } else if (input instanceof Uint8Array) { + return Buffer.from(input); + } else { + // expect string all other values are invalid and return empty buffer + return typeof input === "string" ? encoder(input) : Buffer.alloc(0); + } +}; + +Utils.readBigUInt64LE = function (/*Buffer*/ buffer, /*int*/ index) { + var slice = Buffer.from(buffer.slice(index, index + 8)); + slice.swap64(); + + return parseInt(`0x${slice.toString("hex")}`); +}; + +Utils.fromDOS2Date = function (val) { + return new Date(((val >> 25) & 0x7f) + 1980, Math.max(((val >> 21) & 0x0f) - 1, 0), Math.max((val >> 16) & 0x1f, 1), (val >> 11) & 0x1f, (val >> 5) & 0x3f, (val & 0x1f) << 1); +}; + +Utils.fromDate2DOS = function (val) { + let date = 0; + let time = 0; + if (val.getFullYear() > 1979) { + date = (((val.getFullYear() - 1980) & 0x7f) << 9) | ((val.getMonth() + 1) << 5) | val.getDate(); + time = (val.getHours() << 11) | (val.getMinutes() << 5) | (val.getSeconds() >> 1); + } + return (date << 16) | time; +}; + +Utils.isWin = isWin; // Do we have windows system +Utils.crcTable = crcTable; /***/ }), -/***/ 4057: +/***/ 2609: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var Utils = __nccwpck_require__(5182), - Headers = __nccwpck_require__(4958), +var Utils = __nccwpck_require__(5391), + Headers = __nccwpck_require__(1907), Constants = Utils.Constants, - Methods = __nccwpck_require__(3928); + Methods = __nccwpck_require__(3667); -module.exports = function (/*Buffer*/input) { - - var _entryHeader = new Headers.EntryHeader(), +module.exports = function (/** object */ options, /*Buffer*/ input) { + var _centralHeader = new Headers.EntryHeader(), _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, - _extra = Buffer.alloc(0); + _extra = Buffer.alloc(0), + _extralocal = Buffer.alloc(0), + _efs = true; + + // assign options + const opts = options; + + const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder; + _efs = decoder.hasOwnProperty("efs") ? decoder.efs : false; function getCompressedDataFromZip() { - if (!input || !Buffer.isBuffer(input)) { + //if (!input || !Buffer.isBuffer(input)) { + if (!input || !(input instanceof Uint8Array)) { return Buffer.alloc(0); } - _entryHeader.loadDataHeaderFromBinary(input); - return input.slice(_entryHeader.realDataOffset, _entryHeader.realDataOffset + _entryHeader.compressedSize) + _extralocal = _centralHeader.loadLocalHeaderFromBinary(input); + return input.slice(_centralHeader.realDataOffset, _centralHeader.realDataOffset + _centralHeader.compressedSize); } function crc32OK(data) { - // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the header is written - if ((_entryHeader.flags & 0x8) !== 0x8) { - if (Utils.crc32(data) !== _entryHeader.dataHeader.crc) { - return false; - } + // if bit 3 (0x08) of the general-purpose flags field is set, then the CRC-32 and file sizes are not known when the local header is written + if (!_centralHeader.flags_desc) { + if (Utils.crc32(data) !== _centralHeader.localHeader.crc) { + return false; + } } else { - // @TODO: load and check data descriptor header - // The fields in the local header are filled with zero, and the CRC-32 and size are appended in a 12-byte structure - // (optionally preceded by a 4-byte signature) immediately after the compressed data: + const descriptor = {}; + const dataEndOffset = _centralHeader.realDataOffset + _centralHeader.compressedSize; + // no descriptor after compressed data, instead new local header + if (input.readUInt32LE(dataEndOffset) == Constants.LOCSIG || input.readUInt32LE(dataEndOffset) == Constants.CENSIG) { + throw Utils.Errors.DESCRIPTOR_NOT_EXIST(); + } + + // get decriptor data + if (input.readUInt32LE(dataEndOffset) == Constants.EXTSIG) { + // descriptor with signature + descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC); + descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ); + descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN); + } else if (input.readUInt16LE(dataEndOffset + 12) === 0x4b50) { + // descriptor without signature (we check is new header starting where we expect) + descriptor.crc = input.readUInt32LE(dataEndOffset + Constants.EXTCRC - 4); + descriptor.compressedSize = input.readUInt32LE(dataEndOffset + Constants.EXTSIZ - 4); + descriptor.size = input.readUInt32LE(dataEndOffset + Constants.EXTLEN - 4); + } else { + throw Utils.Errors.DESCRIPTOR_UNKNOWN(); + } + + // check data integrity + if (descriptor.compressedSize !== _centralHeader.compressedSize || descriptor.size !== _centralHeader.size || descriptor.crc !== _centralHeader.crc) { + throw Utils.Errors.DESCRIPTOR_FAULTY(); + } + if (Utils.crc32(data) !== descriptor.crc) { + return false; + } + + // @TODO: zip64 bit descriptor fields + // if bit 3 is set and any value in local header "zip64 Extended information" extra field are set 0 (place holder) + // then 64-bit descriptor format is used instead of 32-bit + // central header - "zip64 Extended information" extra field should store real values and not place holders } return true; } - function decompress(/*Boolean*/async, /*Function*/callback, /*String, Buffer*/pass) { - if(typeof callback === 'undefined' && typeof async === 'string') { - pass=async; - async=void 0; + function decompress(/*Boolean*/ async, /*Function*/ callback, /*String, Buffer*/ pass) { + if (typeof callback === "undefined" && typeof async === "string") { + pass = async; + async = void 0; } if (_isDirectory) { if (async && callback) { - callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR); //si added error. + callback(Buffer.alloc(0), Utils.Errors.DIRECTORY_CONTENT_ERROR()); //si added error. } return Buffer.alloc(0); } @@ -10099,52 +13885,55 @@ module.exports = function (/*Buffer*/input) { return compressedData; } - if (_entryHeader.encripted){ - if ('string' !== typeof pass && !Buffer.isBuffer(pass)){ - throw new Error('ADM-ZIP: Incompatible password parameter'); + if (_centralHeader.encrypted) { + if ("string" !== typeof pass && !Buffer.isBuffer(pass)) { + throw Utils.Errors.INVALID_PASS_PARAM(); } - compressedData = Methods.ZipCrypto.decrypt(compressedData, _entryHeader, pass); + compressedData = Methods.ZipCrypto.decrypt(compressedData, _centralHeader, pass); } - var data = Buffer.alloc(_entryHeader.size); + var data = Buffer.alloc(_centralHeader.size); - switch (_entryHeader.method) { + switch (_centralHeader.method) { case Utils.Constants.STORED: compressedData.copy(data); if (!crc32OK(data)) { - if (async && callback) callback(data, Utils.Errors.BAD_CRC);//si added error - throw new Error(Utils.Errors.BAD_CRC); - } else {//si added otherwise did not seem to return data. + if (async && callback) callback(data, Utils.Errors.BAD_CRC()); //si added error + throw Utils.Errors.BAD_CRC(); + } else { + //si added otherwise did not seem to return data. if (async && callback) callback(data); return data; } case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(compressedData); + var inflater = new Methods.Inflater(compressedData, _centralHeader.size); if (!async) { - var result = inflater.inflate(data); + const result = inflater.inflate(data); result.copy(data, 0); if (!crc32OK(data)) { - throw new Error(Utils.Errors.BAD_CRC + " " + _entryName.toString()); + throw Utils.Errors.BAD_CRC(`"${decoder.decode(_entryName)}"`); } return data; } else { - inflater.inflateAsync(function(result) { - result.copy(data, 0); - if (!crc32OK(data)) { - if (callback) callback(data, Utils.Errors.BAD_CRC); //si added error - } else { //si added otherwise did not seem to return data. - if (callback) callback(data); + inflater.inflateAsync(function (result) { + result.copy(result, 0); + if (callback) { + if (!crc32OK(result)) { + callback(result, Utils.Errors.BAD_CRC()); //si added error + } else { + callback(result); + } } - }) + }); } break; default: - if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD); - throw new Error(Utils.Errors.UNKNOWN_METHOD); + if (async && callback) callback(Buffer.alloc(0), Utils.Errors.UNKNOWN_METHOD()); + throw Utils.Errors.UNKNOWN_METHOD(); } } - function compress(/*Boolean*/async, /*Function*/callback) { + function compress(/*Boolean*/ async, /*Function*/ callback) { if ((!uncompressedData || !uncompressedData.length) && Buffer.isBuffer(input)) { // no data set or the data wasn't changed to require recompression if (async && callback) callback(getCompressedDataFromZip()); @@ -10154,9 +13943,9 @@ module.exports = function (/*Buffer*/input) { if (uncompressedData.length && !_isDirectory) { var compressedData; // Local file header - switch (_entryHeader.method) { + switch (_centralHeader.method) { case Utils.Constants.STORED: - _entryHeader.compressedSize = _entryHeader.size; + _centralHeader.compressedSize = _centralHeader.size; compressedData = Buffer.alloc(uncompressedData.length); uncompressedData.copy(compressedData); @@ -10165,29 +13954,26 @@ module.exports = function (/*Buffer*/input) { return compressedData; default: case Utils.Constants.DEFLATED: - var deflater = new Methods.Deflater(uncompressedData); if (!async) { var deflated = deflater.deflate(); - _entryHeader.compressedSize = deflated.length; + _centralHeader.compressedSize = deflated.length; return deflated; } else { - deflater.deflateAsync(function(data) { + deflater.deflateAsync(function (data) { compressedData = Buffer.alloc(data.length); - _entryHeader.compressedSize = data.length; + _centralHeader.compressedSize = data.length; data.copy(compressedData); callback && callback(compressedData); - }) + }); } deflater = null; break; } + } else if (async && callback) { + callback(Buffer.alloc(0)); } else { - if (async && callback) { - callback(Buffer.alloc(0)); - } else { - return Buffer.alloc(0); - } + return Buffer.alloc(0); } } @@ -10196,18 +13982,22 @@ module.exports = function (/*Buffer*/input) { } function parseExtra(data) { - var offset = 0; - var signature, size, part; - while(offset= Constants.EF_ZIP64_SCOMP) { + if (data.length >= Constants.EF_ZIP64_SCOMP) { size = readUInt64LE(data, Constants.EF_ZIP64_SUNCOMP); - if(_entryHeader.size === Constants.EF_ZIP64_OR_32) { - _entryHeader.size = size; + if (_centralHeader.size === Constants.EF_ZIP64_OR_32) { + _centralHeader.size = size; } } - if(data.length >= Constants.EF_ZIP64_RHO) { + if (data.length >= Constants.EF_ZIP64_RHO) { compressedSize = readUInt64LE(data, Constants.EF_ZIP64_SCOMP); - if(_entryHeader.compressedSize === Constants.EF_ZIP64_OR_32) { - _entryHeader.compressedSize = compressedSize; + if (_centralHeader.compressedSize === Constants.EF_ZIP64_OR_32) { + _centralHeader.compressedSize = compressedSize; } } - if(data.length >= Constants.EF_ZIP64_DSN) { + if (data.length >= Constants.EF_ZIP64_DSN) { offset = readUInt64LE(data, Constants.EF_ZIP64_RHO); - if(_entryHeader.offset === Constants.EF_ZIP64_OR_32) { - _entryHeader.offset = offset; + if (_centralHeader.offset === Constants.EF_ZIP64_OR_32) { + _centralHeader.offset = offset; } } - if(data.length >= Constants.EF_ZIP64_DSN+4) { + if (data.length >= Constants.EF_ZIP64_DSN + 4) { diskNumStart = data.readUInt32LE(Constants.EF_ZIP64_DSN); - if(_entryHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { - _entryHeader.diskNumStart = diskNumStart; + if (_centralHeader.diskNumStart === Constants.EF_ZIP64_OR_16) { + _centralHeader.diskNumStart = diskNumStart; } } } - return { - get entryName () { return _entryName.toString(); }, - get rawEntryName() { return _entryName; }, - set entryName (val) { - _entryName = Utils.toBuffer(val); + get entryName() { + return decoder.decode(_entryName); + }, + get rawEntryName() { + return _entryName; + }, + set entryName(val) { + _entryName = Utils.toBuffer(val, decoder.encode); var lastChar = _entryName[_entryName.length - 1]; - _isDirectory = (lastChar === 47) || (lastChar === 92); - _entryHeader.fileNameLength = _entryName.length; + _isDirectory = lastChar === 47 || lastChar === 92; + _centralHeader.fileNameLength = _entryName.length; }, - get extra () { return _extra; }, - set extra (val) { + get efs() { + if (typeof _efs === "function") { + return _efs(this.entryName); + } else { + return _efs; + } + }, + + get extra() { + return _extra; + }, + set extra(val) { _extra = val; - _entryHeader.extraLength = val.length; + _centralHeader.extraLength = val.length; parseExtra(val); }, - get comment () { return _comment.toString(); }, - set comment (val) { - _comment = Utils.toBuffer(val); - _entryHeader.commentLength = _comment.length; + get comment() { + return decoder.decode(_comment); + }, + set comment(val) { + _comment = Utils.toBuffer(val, decoder.encode); + _centralHeader.commentLength = _comment.length; + if (_comment.length > 0xffff) throw Utils.Errors.COMMENT_TOO_LONG(); }, - get name () { var n = _entryName.toString(); return _isDirectory ? n.substr(n.length - 1).split("/").pop() : n.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - getCompressedData : function() { - return compress(false, null) + get name() { + var n = decoder.decode(_entryName); + return _isDirectory + ? n + .substr(n.length - 1) + .split("/") + .pop() + : n.split("/").pop(); + }, + get isDirectory() { + return _isDirectory; }, - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) + getCompressedData: function () { + return compress(false, null); }, - setData : function(value) { - uncompressedData = Utils.toBuffer(value); + getCompressedDataAsync: function (/*Function*/ callback) { + compress(true, callback); + }, + + setData: function (value) { + uncompressedData = Utils.toBuffer(value, Utils.decoder.encode); if (!_isDirectory && uncompressedData.length) { - _entryHeader.size = uncompressedData.length; - _entryHeader.method = Utils.Constants.DEFLATED; - _entryHeader.crc = Utils.crc32(value); - _entryHeader.changed = true; - } else { // folders and blank files should be stored - _entryHeader.method = Utils.Constants.STORED; + _centralHeader.size = uncompressedData.length; + _centralHeader.method = Utils.Constants.DEFLATED; + _centralHeader.crc = Utils.crc32(value); + _centralHeader.changed = true; + } else { + // folders and blank files should be stored + _centralHeader.method = Utils.Constants.STORED; } }, - getData : function(pass) { - if (_entryHeader.changed) { - return uncompressedData; - } else { - return decompress(false, null, pass); + getData: function (pass) { + if (_centralHeader.changed) { + return uncompressedData; + } else { + return decompress(false, null, pass); } }, - getDataAsync : function(/*Function*/callback, pass) { - if (_entryHeader.changed) { - callback(uncompressedData) - } else { - decompress(true, callback, pass) + getDataAsync: function (/*Function*/ callback, pass) { + if (_centralHeader.changed) { + callback(uncompressedData); + } else { + decompress(true, callback, pass); } }, - set attr(attr) { _entryHeader.attr = attr; }, - get attr() { return _entryHeader.attr; }, + set attr(attr) { + _centralHeader.attr = attr; + }, + get attr() { + return _centralHeader.attr; + }, - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); + set header(/*Buffer*/ data) { + _centralHeader.loadFromBinary(data); }, get header() { - return _entryHeader; + return _centralHeader; }, - packHeader : function() { - var header = _entryHeader.entryHeaderToBinary(); - // add - _entryName.copy(header, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - _comment.copy(header, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length); - } + packCentralHeader: function () { + _centralHeader.flags_efs = this.efs; + _centralHeader.extraLength = _extra.length; + // 1. create header (buffer) + var header = _centralHeader.centralHeaderToBinary(); + var addpos = Utils.Constants.CENHDR; + // 2. add file name + _entryName.copy(header, addpos); + addpos += _entryName.length; + // 3. add extra data + _extra.copy(header, addpos); + addpos += _centralHeader.extraLength; + // 4. add file comment + _comment.copy(header, addpos); return header; }, - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName.toString() + "\",\n" + - '\t"name" : "' + (_isDirectory ? _entryName.toString().replace(/\/$/, '').split("/").pop() : _entryName.toString().split("/").pop()) + "\",\n" + - '\t"comment" : "' + _comment.toString() + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t").replace(/}/mg, "\t}") + ",\n" + - '\t"compressedData" : <' + (input && input.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (uncompressedData && uncompressedData.length + " bytes buffer" || "null") + ">\n" + - '}'; + packLocalHeader: function () { + let addpos = 0; + _centralHeader.flags_efs = this.efs; + _centralHeader.extraLocalLength = _extralocal.length; + // 1. construct local header Buffer + const localHeaderBuf = _centralHeader.localHeaderToBinary(); + // 2. localHeader - crate header buffer + const localHeader = Buffer.alloc(localHeaderBuf.length + _entryName.length + _centralHeader.extraLocalLength); + // 2.1 add localheader + localHeaderBuf.copy(localHeader, addpos); + addpos += localHeaderBuf.length; + // 2.2 add file name + _entryName.copy(localHeader, addpos); + addpos += _entryName.length; + // 2.3 add extra field + _extralocal.copy(localHeader, addpos); + addpos += _extralocal.length; + + return localHeader; + }, + + toJSON: function () { + const bytes = function (nr) { + return "<" + ((nr && nr.length + " bytes buffer") || "null") + ">"; + }; + + return { + entryName: this.entryName, + name: this.name, + comment: this.comment, + isDirectory: this.isDirectory, + header: _centralHeader.toJSON(), + compressedData: bytes(input), + data: bytes(uncompressedData) + }; + }, + + toString: function () { + return JSON.stringify(this.toJSON(), null, "\t"); + } + }; +}; + + +/***/ }), + +/***/ 6991: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const ZipEntry = __nccwpck_require__(2609); +const Headers = __nccwpck_require__(1907); +const Utils = __nccwpck_require__(5391); + +module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { + var entryList = [], + entryTable = {}, + _comment = Buffer.alloc(0), + mainHeader = new Headers.MainHeader(), + loadedEntries = false; + var password = null; + const temporary = new Set(); + + // assign options + const opts = options; + + const { noSort, decoder } = opts; + + if (inBuffer) { + // is a memory buffer + readMainHeader(opts.readEntries); + } else { + // none. is a new file + loadedEntries = true; + } + + function makeTemporaryFolders() { + const foldersList = new Set(); + + // Make list of all folders in file + for (const elem of Object.keys(entryTable)) { + const elements = elem.split("/"); + elements.pop(); // filename + if (!elements.length) continue; // no folders + for (let i = 0; i < elements.length; i++) { + const sub = elements.slice(0, i + 1).join("/") + "/"; + foldersList.add(sub); + } + } + + // create missing folders as temporary + for (const elem of foldersList) { + if (!(elem in entryTable)) { + const tempfolder = new ZipEntry(opts); + tempfolder.entryName = elem; + tempfolder.attr = 0x10; + tempfolder.temporary = true; + entryList.push(tempfolder); + entryTable[tempfolder.entryName] = tempfolder; + temporary.add(tempfolder); + } } } + + function readEntries() { + loadedEntries = true; + entryTable = {}; + if (mainHeader.diskEntries > (inBuffer.length - mainHeader.offset) / Utils.Constants.CENHDR) { + throw Utils.Errors.DISK_ENTRY_TOO_LARGE(); + } + entryList = new Array(mainHeader.diskEntries); // total number of entries + var index = mainHeader.offset; // offset of first CEN header + for (var i = 0; i < entryList.length; i++) { + var tmp = index, + entry = new ZipEntry(opts, inBuffer); + entry.header = inBuffer.slice(tmp, (tmp += Utils.Constants.CENHDR)); + + entry.entryName = inBuffer.slice(tmp, (tmp += entry.header.fileNameLength)); + + if (entry.header.extraLength) { + entry.extra = inBuffer.slice(tmp, (tmp += entry.header.extraLength)); + } + + if (entry.header.commentLength) entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); + + index += entry.header.centralHeaderSize; + + entryList[i] = entry; + entryTable[entry.entryName] = entry; + } + temporary.clear(); + makeTemporaryFolders(); + } + + function readMainHeader(/*Boolean*/ readNow) { + var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size + max = Math.max(0, i - 0xffff), // 0xFFFF is the max zip file comment length + n = max, + endStart = inBuffer.length, + endOffset = -1, // Start offset of the END header + commentEnd = 0; + + // option to search header form entire file + const trailingSpace = typeof opts.trailingSpace === "boolean" ? opts.trailingSpace : false; + if (trailingSpace) max = 0; + + for (i; i >= n; i--) { + if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P' + if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { + // "PK\005\006" + endOffset = i; + commentEnd = i; + endStart = i + Utils.Constants.ENDHDR; + // We already found a regular signature, let's look just a bit further to check if there's any zip64 signature + n = i - Utils.Constants.END64HDR; + continue; + } + + if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { + // Found a zip64 signature, let's continue reading the whole zip64 record + n = max; + continue; + } + + if (inBuffer.readUInt32LE(i) === Utils.Constants.ZIP64SIG) { + // Found the zip64 record, let's determine it's size + endOffset = i; + endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; + break; + } + } + + if (endOffset == -1) throw Utils.Errors.INVALID_FORMAT(); + + mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); + if (mainHeader.commentLength) { + _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); + } + if (readNow) readEntries(); + } + + function sortEntries() { + if (entryList.length > 1 && !noSort) { + entryList.sort((a, b) => a.entryName.toLowerCase().localeCompare(b.entryName.toLowerCase())); + } + } + + return { + /** + * Returns an array of ZipEntry objects existent in the current opened archive + * @return Array + */ + get entries() { + if (!loadedEntries) { + readEntries(); + } + return entryList.filter((e) => !temporary.has(e)); + }, + + /** + * Archive comment + * @return {String} + */ + get comment() { + return decoder.decode(_comment); + }, + set comment(val) { + _comment = Utils.toBuffer(val, decoder.encode); + mainHeader.commentLength = _comment.length; + }, + + getEntryCount: function () { + if (!loadedEntries) { + return mainHeader.diskEntries; + } + + return entryList.length; + }, + + forEach: function (callback) { + this.entries.forEach(callback); + }, + + /** + * Returns a reference to the entry with the given name or null if entry is inexistent + * + * @param entryName + * @return ZipEntry + */ + getEntry: function (/*String*/ entryName) { + if (!loadedEntries) { + readEntries(); + } + return entryTable[entryName] || null; + }, + + /** + * Adds the given entry to the entry list + * + * @param entry + */ + setEntry: function (/*ZipEntry*/ entry) { + if (!loadedEntries) { + readEntries(); + } + entryList.push(entry); + entryTable[entry.entryName] = entry; + mainHeader.totalEntries = entryList.length; + }, + + /** + * Removes the file with the given name from the entry list. + * + * If the entry is a directory, then all nested files and directories will be removed + * @param entryName + * @returns {void} + */ + deleteFile: function (/*String*/ entryName, withsubfolders = true) { + if (!loadedEntries) { + readEntries(); + } + const entry = entryTable[entryName]; + const list = this.getEntryChildren(entry, withsubfolders).map((child) => child.entryName); + + list.forEach(this.deleteEntry); + }, + + /** + * Removes the entry with the given name from the entry list. + * + * @param {string} entryName + * @returns {void} + */ + deleteEntry: function (/*String*/ entryName) { + if (!loadedEntries) { + readEntries(); + } + const entry = entryTable[entryName]; + const index = entryList.indexOf(entry); + if (index >= 0) { + entryList.splice(index, 1); + delete entryTable[entryName]; + mainHeader.totalEntries = entryList.length; + } + }, + + /** + * Iterates and returns all nested files and directories of the given entry + * + * @param entry + * @return Array + */ + getEntryChildren: function (/*ZipEntry*/ entry, subfolders = true) { + if (!loadedEntries) { + readEntries(); + } + if (typeof entry === "object") { + if (entry.isDirectory && subfolders) { + const list = []; + const name = entry.entryName; + + for (const zipEntry of entryList) { + if (zipEntry.entryName.startsWith(name)) { + list.push(zipEntry); + } + } + return list; + } else { + return [entry]; + } + } + return []; + }, + + /** + * How many child elements entry has + * + * @param {ZipEntry} entry + * @return {integer} + */ + getChildCount: function (entry) { + if (entry && entry.isDirectory) { + const list = this.getEntryChildren(entry); + return list.includes(entry) ? list.length - 1 : list.length; + } + return 0; + }, + + /** + * Returns the zip file + * + * @return Buffer + */ + compressToBuffer: function () { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + + const dataBlock = []; + const headerBlocks = []; + let totalSize = 0; + let dindex = 0; + + mainHeader.size = 0; + mainHeader.offset = 0; + let totalEntries = 0; + + for (const entry of this.entries) { + // compress data and set local and entry header accordingly. Reason why is called first + const compressedData = entry.getCompressedData(); + entry.header.offset = dindex; + + // 1. construct local header + const localHeader = entry.packLocalHeader(); + + // 2. offsets + const dataLength = localHeader.length + compressedData.length; + dindex += dataLength; + + // 3. store values in sequence + dataBlock.push(localHeader); + dataBlock.push(compressedData); + + // 4. construct central header + const centralHeader = entry.packCentralHeader(); + headerBlocks.push(centralHeader); + // 5. update main header + mainHeader.size += centralHeader.length; + totalSize += dataLength + centralHeader.length; + totalEntries++; + } + + totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length + // point to end of data and beginning of central directory first record + mainHeader.offset = dindex; + mainHeader.totalEntries = totalEntries; + + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + // write data blocks + for (const content of dataBlock) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + + // write central directory entries + for (const content of headerBlocks) { + content.copy(outBuffer, dindex); + dindex += content.length; + } + + // write main header + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment + } + mh.copy(outBuffer, dindex); + + // Since we update entry and main header offsets, + // they are no longer valid and we have to reset content + // (Issue 64) + + inBuffer = outBuffer; + loadedEntries = false; + + return outBuffer; + }, + + toAsyncBuffer: function (/*Function*/ onSuccess, /*Function*/ onFail, /*Function*/ onItemStart, /*Function*/ onItemEnd) { + try { + if (!loadedEntries) { + readEntries(); + } + sortEntries(); + + const dataBlock = []; + const centralHeaders = []; + let totalSize = 0; + let dindex = 0; + let totalEntries = 0; + + mainHeader.size = 0; + mainHeader.offset = 0; + + const compress2Buffer = function (entryLists) { + if (entryLists.length > 0) { + const entry = entryLists.shift(); + const name = entry.entryName + entry.extra.toString(); + if (onItemStart) onItemStart(name); + entry.getCompressedDataAsync(function (compressedData) { + if (onItemEnd) onItemEnd(name); + entry.header.offset = dindex; + + // 1. construct local header + const localHeader = entry.packLocalHeader(); + + // 2. offsets + const dataLength = localHeader.length + compressedData.length; + dindex += dataLength; + + // 3. store values in sequence + dataBlock.push(localHeader); + dataBlock.push(compressedData); + + // central header + const centalHeader = entry.packCentralHeader(); + centralHeaders.push(centalHeader); + mainHeader.size += centalHeader.length; + totalSize += dataLength + centalHeader.length; + totalEntries++; + + compress2Buffer(entryLists); + }); + } else { + totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length + // point to end of data and beginning of central directory first record + mainHeader.offset = dindex; + mainHeader.totalEntries = totalEntries; + + dindex = 0; + const outBuffer = Buffer.alloc(totalSize); + dataBlock.forEach(function (content) { + content.copy(outBuffer, dindex); // write data blocks + dindex += content.length; + }); + centralHeaders.forEach(function (content) { + content.copy(outBuffer, dindex); // write central directory entries + dindex += content.length; + }); + + const mh = mainHeader.toBinary(); + if (_comment) { + _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment + } + + mh.copy(outBuffer, dindex); // write main header + + // Since we update entry and main header offsets, they are no + // longer valid and we have to reset content using our new buffer + // (Issue 64) + + inBuffer = outBuffer; + loadedEntries = false; + + onSuccess(outBuffer); + } + }; + + compress2Buffer(Array.from(this.entries)); + } catch (e) { + onFail(e); + } + } + }; }; /***/ }), -/***/ 7744: +/***/ 2732: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var ZipEntry = __nccwpck_require__(4057), - Headers = __nccwpck_require__(4958), - Utils = __nccwpck_require__(5182); - -module.exports = function (/*String|Buffer*/input, /*Number*/inputType) { - var entryList = [], - entryTable = {}, - _comment = Buffer.alloc(0), - filename = "", - fs = Utils.FileSystem.require(), - inBuffer = null, - mainHeader = new Headers.MainHeader(), - loadedEntries = false; - - if (inputType === Utils.Constants.FILE) { - // is a filename - filename = input; - inBuffer = fs.readFileSync(filename); - readMainHeader(); - } else if (inputType === Utils.Constants.BUFFER) { - // is a memory buffer - inBuffer = input; - readMainHeader(); - } else { - // none. is a new file - loadedEntries = true; - } - - function iterateEntries(callback) { - const totalEntries = mainHeader.diskEntries; // total number of entries - let index = mainHeader.offset; // offset of first CEN header - - for (let i = 0; i < totalEntries; i++) { - let tmp = index; - const entry = new ZipEntry(inBuffer); - - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - index += entry.header.entryHeaderSize; - - callback(entry); - } - } - - function readEntries() { - loadedEntries = true; - entryTable = {}; - entryList = new Array(mainHeader.diskEntries); // total number of entries - var index = mainHeader.offset; // offset of first CEN header - for (var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(inBuffer); - entry.header = inBuffer.slice(tmp, tmp += Utils.Constants.CENHDR); - - entry.entryName = inBuffer.slice(tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) { - entry.extra = inBuffer.slice(tmp, tmp += entry.header.extraLength); - } - - if (entry.header.commentLength) - entry.comment = inBuffer.slice(tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = inBuffer.length - Utils.Constants.ENDHDR, // END header size - max = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - n = max, - endStart = inBuffer.length, - endOffset = -1, // Start offset of the END header - commentEnd = 0; - - for (i; i >= n; i--) { - if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P' - if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - commentEnd = i; - endStart = i + Utils.Constants.ENDHDR; - // We already found a regular signature, let's look just a bit further to check if there's any zip64 signature - n = i - Utils.Constants.END64HDR; - continue; - } - - if (inBuffer.readUInt32LE(i) === Utils.Constants.END64SIG) { - // Found a zip64 signature, let's continue reading the whole zip64 record - n = max; - continue; - } - - if (inBuffer.readUInt32LE(i) == Utils.Constants.ZIP64SIG) { - // Found the zip64 record, let's determine it's size - endOffset = i; - endStart = i + Utils.readBigUInt64LE(inBuffer, i + Utils.Constants.ZIP64SIZE) + Utils.Constants.ZIP64LEAD; - break; - } - } - - if (!~endOffset) - throw new Error(Utils.Errors.INVALID_FORMAT); - - mainHeader.loadFromBinary(inBuffer.slice(endOffset, endStart)); - if (mainHeader.commentLength) { - _comment = inBuffer.slice(commentEnd + Utils.Constants.ENDHDR); - } - // readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries() { - if (!loadedEntries) { - readEntries(); - } - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment() { - return _comment.toString(); - }, - set comment(val) { - _comment = Utils.toBuffer(val); - mainHeader.commentLength = _comment.length; - }, - - getEntryCount: function() { - if (!loadedEntries) { - return mainHeader.diskEntries; - } - - return entryList.length; - }, - - forEach: function(callback) { - if (!loadedEntries) { - iterateEntries(callback); - return; - } - - entryList.forEach(callback); - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry: function (/*String*/entryName) { - if (!loadedEntries) { - readEntries(); - } - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry: function (/*ZipEntry*/entry) { - if (!loadedEntries) { - readEntries(); - } - entryList.push(entry); - entryTable[entry.entryName] = entry; - mainHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry: function (/*String*/entryName) { - if (!loadedEntries) { - readEntries(); - } - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function (child) { - if (child.entryName !== entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.splice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - mainHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren: function (/*ZipEntry*/entry) { - if (!loadedEntries) { - readEntries(); - } - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function (zipEntry) { - if (zipEntry.entryName.substr(0, len) === name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - compressToBuffer: function () { - if (!loadedEntries) { - readEntries(); - } - if (entryList.length > 1) { - entryList.sort(function (a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA < nameB) { - return -1 - } - if (nameA > nameB) { - return 1 - } - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - entryList.forEach(function (entry) { - // compress data and set local and entry header accordingly. Reason why is called first - var compressedData = entry.getCompressedData(); - // data header - entry.header.offset = dindex; - var dataHeader = entry.header.dataHeaderToBinary(); - var entryNameLen = entry.rawEntryName.length; - var extra = entry.extra.toString(); - var postHeader = Buffer.alloc(entryNameLen + extra.length); - entry.rawEntryName.copy(postHeader, 0); - postHeader.fill(extra, entryNameLen); - - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - }); - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and beginning of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = Buffer.alloc(totalSize); - dataBlock.forEach(function (content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function (content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - Buffer.from(_comment).copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - return outBuffer - }, - - toAsyncBuffer: function (/*Function*/onSuccess, /*Function*/onFail, /*Function*/onItemStart, /*Function*/onItemEnd) { - if (!loadedEntries) { - readEntries(); - } - if (entryList.length > 1) { - entryList.sort(function (a, b) { - var nameA = a.entryName.toLowerCase(); - var nameB = b.entryName.toLowerCase(); - if (nameA > nameB) { - return -1 - } - if (nameA < nameB) { - return 1 - } - return 0; - }); - } - - var totalSize = 0, - dataBlock = [], - entryHeaders = [], - dindex = 0; - - mainHeader.size = 0; - mainHeader.offset = 0; - - var compress = function (entryList) { - var self = arguments.callee; - if (entryList.length) { - var entry = entryList.pop(); - var name = entry.entryName + entry.extra.toString(); - if (onItemStart) onItemStart(name); - entry.getCompressedDataAsync(function (compressedData) { - if (onItemEnd) onItemEnd(name); - - entry.header.offset = dindex; - // data header - var dataHeader = entry.header.dataHeaderToBinary(); - var postHeader; - try { - postHeader = Buffer.alloc(name.length, name); // using alloc will work on node 5.x+ - } catch(e){ - postHeader = new Buffer(name); // use deprecated method if alloc fails... - } - var dataLength = dataHeader.length + postHeader.length + compressedData.length; - - dindex += dataLength; - - dataBlock.push(dataHeader); - dataBlock.push(postHeader); - dataBlock.push(compressedData); - - var entryHeader = entry.packHeader(); - entryHeaders.push(entryHeader); - mainHeader.size += entryHeader.length; - totalSize += (dataLength + entryHeader.length); - - if (entryList.length) { - self(entryList); - } else { - - - totalSize += mainHeader.mainHeaderSize; // also includes zip file comment length - // point to end of data and beginning of central directory first record - mainHeader.offset = dindex; - - dindex = 0; - var outBuffer = Buffer.alloc(totalSize); - dataBlock.forEach(function (content) { - content.copy(outBuffer, dindex); // write data blocks - dindex += content.length; - }); - entryHeaders.forEach(function (content) { - content.copy(outBuffer, dindex); // write central directory entries - dindex += content.length; - }); - - var mh = mainHeader.toBinary(); - if (_comment) { - _comment.copy(mh, Utils.Constants.ENDHDR); // add zip file comment - } - - mh.copy(outBuffer, dindex); // write main header - - onSuccess(outBuffer); - } - }); - } - }; - - compress(entryList); - } - } -}; - - -/***/ }), - -/***/ 3682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(4670) -var addHook = __nccwpck_require__(5549) -var removeHook = __nccwpck_require__(6819) +var register = __nccwpck_require__(1063); +var addHook = __nccwpck_require__(2027); +var removeHook = __nccwpck_require__(9934); // bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind -var bindable = bind.bind(bind) +var bind = Function.bind; +var bindable = bind.bind(bind); -function bindApi (hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) - hook.api = { remove: removeHookRef } - hook.remove = removeHookRef - - ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind] - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) - }) +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); } -function HookSingular () { - var singularHookName = 'h' +function HookSingular() { + var singularHookName = "h"; var singularHookState = { - registry: {} - } - var singularHook = register.bind(null, singularHookState, singularHookName) - bindApi(singularHook, singularHookState, singularHookName) - return singularHook + registry: {}, + }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; } -function HookCollection () { +function HookCollection() { var state = { - registry: {} - } + registry: {}, + }; - var hook = register.bind(null, state) - bindApi(hook, state) + var hook = register.bind(null, state); + bindApi(hook, state); - return hook + return hook; } -var collectionHookDeprecationMessageDisplayed = false -function Hook () { +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { if (!collectionHookDeprecationMessageDisplayed) { - console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') - collectionHookDeprecationMessageDisplayed = true + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; } - return HookCollection() + return HookCollection(); } -Hook.Singular = HookSingular.bind() -Hook.Collection = HookCollection.bind() +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); -module.exports = Hook +module.exports = Hook; // expose constructors as a named property for TypeScript -module.exports.Hook = Hook -module.exports.Singular = Hook.Singular -module.exports.Collection = Hook.Collection +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; /***/ }), -/***/ 5549: +/***/ 2027: /***/ ((module) => { -module.exports = addHook +module.exports = addHook; -function addHook (state, kind, name, hook) { - var orig = hook +function addHook(state, kind, name, hook) { + var orig = hook; if (!state.registry[name]) { - state.registry[name] = [] + state.registry[name] = []; } - if (kind === 'before') { + if (kind === "before") { hook = function (method, options) { return Promise.resolve() .then(orig.bind(null, options)) - .then(method.bind(null, options)) - } + .then(method.bind(null, options)); + }; } - if (kind === 'after') { + if (kind === "after") { hook = function (method, options) { - var result + var result; return Promise.resolve() .then(method.bind(null, options)) .then(function (result_) { - result = result_ - return orig(result, options) + result = result_; + return orig(result, options); }) .then(function () { - return result - }) - } + return result; + }); + }; } - if (kind === 'error') { + if (kind === "error") { hook = function (method, options) { return Promise.resolve() .then(method.bind(null, options)) .catch(function (error) { - return orig(error, options) - }) - } + return orig(error, options); + }); + }; } state.registry[name].push({ hook: hook, - orig: orig - }) + orig: orig, + }); } /***/ }), -/***/ 4670: +/***/ 1063: /***/ ((module) => { -module.exports = register +module.exports = register; -function register (state, name, method, options) { - if (typeof method !== 'function') { - throw new Error('method for before hook must be a function') +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); } if (!options) { - options = {} + options = {}; } if (Array.isArray(name)) { return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options) - }, method)() + return register.bind(null, state, name, callback, options); + }, method)(); } - return Promise.resolve() - .then(function () { - if (!state.registry[name]) { - return method(options) - } + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } - return (state.registry[name]).reduce(function (method, registered) { - return registered.hook.bind(null, method, options) - }, method)() - }) + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); } /***/ }), -/***/ 6819: +/***/ 9934: /***/ ((module) => { -module.exports = removeHook +module.exports = removeHook; -function removeHook (state, name, method) { +function removeHook(state, name, method) { if (!state.registry[name]) { - return + return; } var index = state.registry[name] - .map(function (registered) { return registered.orig }) - .indexOf(method) + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); if (index === -1) { - return + return; } - state.registry[name].splice(index, 1) + state.registry[name].splice(index, 1); } /***/ }), -/***/ 2286: +/***/ 748: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const stringify = __nccwpck_require__(3317); +const compile = __nccwpck_require__(1113); +const expand = __nccwpck_require__(5290); +const parse = __nccwpck_require__(507); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (const pattern of input) { + const result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; + + +/***/ }), + +/***/ 1113: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const fill = __nccwpck_require__(877); +const utils = __nccwpck_require__(2257); + +const compile = (ast, options = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + + if (node.isClose === true) { + console.log('node.isClose', prefix, node.value); + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? prefix + node.value : '('; + } + + if (node.type === 'close') { + return invalid ? prefix + node.value : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (const child of node.nodes) { + output += walk(child, node); + } + } + + return output; + }; + + return walk(ast); +}; + +module.exports = compile; + + +/***/ }), + +/***/ 2477: +/***/ ((module) => { + +"use strict"; + + +module.exports = { + MAX_LENGTH: 10000, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; + + +/***/ }), + +/***/ 5290: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const fill = __nccwpck_require__(877); +const stringify = __nccwpck_require__(3317); +const utils = __nccwpck_require__(2257); + +const append = (queue = '', stash = '', enclose = false) => { + const result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (const item of queue) { + if (Array.isArray(item)) { + for (const value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; + + const walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; + + +/***/ }), + +/***/ 507: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const stringify = __nccwpck_require__(3317); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = __nccwpck_require__(2477); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + const opts = options || {}; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + const ast = { type: 'root', input, nodes: [] }; + const stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + const brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + const type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + const parent = stack[stack.length - 1]; + const index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; + + +/***/ }), + +/***/ 3317: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const utils = __nccwpck_require__(2257); + +module.exports = (ast, options = {}) => { + const stringify = (node, parent = {}) => { + const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (const child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + + + +/***/ }), + +/***/ 2257: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + + if (Array.isArray(ele)) { + flat(ele); + continue; + } + + if (ele !== undefined) { + result.push(ele); + } + } + return result; + }; + + flat(args); + return result; +}; + + +/***/ }), + +/***/ 2417: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -10949,9 +15787,9 @@ const { Resolver: AsyncResolver }, lookup: dnsLookup -} = __nccwpck_require__(881); -const {promisify} = __nccwpck_require__(1669); -const os = __nccwpck_require__(2087); +} = __nccwpck_require__(2250); +const {promisify} = __nccwpck_require__(9023); +const os = __nccwpck_require__(857); const kCacheableLookupCreateConnection = Symbol('cacheableLookupCreateConnection'); const kCacheableLookupInstance = Symbol('cacheableLookupInstance'); @@ -11375,17 +16213,17 @@ class CacheableLookup { } module.exports = CacheableLookup; -module.exports.default = CacheableLookup; +module.exports["default"] = CacheableLookup; /***/ }), -/***/ 4340: +/***/ 6176: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const {PassThrough: PassThroughStream} = __nccwpck_require__(2413); +const {PassThrough: PassThroughStream} = __nccwpck_require__(2203); module.exports = options => { options = {...options}; @@ -11440,14 +16278,14 @@ module.exports = options => { /***/ }), -/***/ 7040: +/***/ 4921: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const {constants: BufferConstants} = __nccwpck_require__(4293); -const pump = __nccwpck_require__(8341); -const bufferStream = __nccwpck_require__(4340); +const {constants: BufferConstants} = __nccwpck_require__(181); +const pump = __nccwpck_require__(7898); +const bufferStream = __nccwpck_require__(6176); class MaxBufferError extends Error { constructor() { @@ -11500,7 +16338,7 @@ async function getStream(inputStream, options) { module.exports = getStream; // TODO: Remove this for the next major release -module.exports.default = getStream; +module.exports["default"] = getStream; module.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'}); module.exports.array = (stream, options) => getStream(stream, {...options, array: true}); module.exports.MaxBufferError = MaxBufferError; @@ -11508,21 +16346,21 @@ module.exports.MaxBufferError = MaxBufferError; /***/ }), -/***/ 8116: +/***/ 1487: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = __nccwpck_require__(8614); -const urlLib = __nccwpck_require__(8835); -const normalizeUrl = __nccwpck_require__(7952); -const getStream = __nccwpck_require__(7040); -const CachePolicy = __nccwpck_require__(1002); -const Response = __nccwpck_require__(9004); -const lowercaseKeys = __nccwpck_require__(9662); -const cloneResponse = __nccwpck_require__(1312); -const Keyv = __nccwpck_require__(1531); +const EventEmitter = __nccwpck_require__(4434); +const urlLib = __nccwpck_require__(7016); +const normalizeUrl = __nccwpck_require__(7827); +const getStream = __nccwpck_require__(4921); +const CachePolicy = __nccwpck_require__(4584); +const Response = __nccwpck_require__(4145); +const lowercaseKeys = __nccwpck_require__(1364); +const cloneResponse = __nccwpck_require__(6358); +const Keyv = __nccwpck_require__(6018); class CacheableRequest { constructor(request, cacheAdapter) { @@ -11767,14 +16605,14 @@ module.exports = CacheableRequest; /***/ }), -/***/ 1312: +/***/ 6358: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const PassThrough = __nccwpck_require__(2413).PassThrough; -const mimicResponse = __nccwpck_require__(2610); +const PassThrough = (__nccwpck_require__(2203).PassThrough); +const mimicResponse = __nccwpck_require__(9991); const cloneResponse = response => { if (!(response && response.pipe)) { @@ -11792,14 +16630,14 @@ module.exports = cloneResponse; /***/ }), -/***/ 2391: +/***/ 1373: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const {Transform, PassThrough} = __nccwpck_require__(2413); -const zlib = __nccwpck_require__(8761); -const mimicResponse = __nccwpck_require__(3877); +const {Transform, PassThrough} = __nccwpck_require__(2203); +const zlib = __nccwpck_require__(3106); +const mimicResponse = __nccwpck_require__(9382); module.exports = response => { const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase(); @@ -11858,7 +16696,7 @@ module.exports = response => { /***/ }), -/***/ 3877: +/***/ 9382: /***/ ((module) => { "use strict"; @@ -11943,13 +16781,15 @@ module.exports = (fromStream, toStream) => { /***/ }), -/***/ 6214: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 2114: +/***/ ((module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const tls_1 = __nccwpck_require__(4016); +function isTLSSocket(socket) { + return socket.encrypted; +} const deferToConnect = (socket, fn) => { let listeners; if (typeof fn === 'function') { @@ -11966,7 +16806,7 @@ const deferToConnect = (socket, fn) => { if (hasConnectListener) { listeners.connect(); } - if (socket instanceof tls_1.TLSSocket && hasSecureConnectListener) { + if (isTLSSocket(socket) && hasSecureConnectListener) { if (socket.authorized) { listeners.secureConnect(); } @@ -11988,15 +16828,15 @@ const deferToConnect = (socket, fn) => { listeners.close(socket._hadError); } }; -exports.default = deferToConnect; +exports["default"] = deferToConnect; // For CommonJS default export support module.exports = deferToConnect; -module.exports.default = deferToConnect; +module.exports["default"] = deferToConnect; /***/ }), -/***/ 8932: +/***/ 4150: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -12024,10 +16864,10 @@ exports.Deprecation = Deprecation; /***/ }), -/***/ 1205: +/***/ 1424: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var once = __nccwpck_require__(1223); +var once = __nccwpck_require__(5560); var noop = function() {}; @@ -12125,2001 +16965,67 @@ module.exports = eos; /***/ }), -/***/ 5582: +/***/ 8188: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const stringify = __nccwpck_require__(4810); -const compile = __nccwpck_require__(7123); -const expand = __nccwpck_require__(6944); -const parse = __nccwpck_require__(9889); +var isGlob = __nccwpck_require__(1925); +var pathPosixDirname = (__nccwpck_require__(6928).posix).dirname; +var isWin32 = (__nccwpck_require__(857).platform)() === 'win32'; + +var slash = '/'; +var backslash = /\\/g; +var enclosure = /[\{\[].*[\}\]]$/; +var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; +var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; /** - * Expand the given pattern or create a regex-compatible string. - * - * ```js - * const braces = require('braces'); - * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] - * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public + * @param {string} str + * @param {Object} opts + * @param {boolean} [opts.flipBackslashes=true] + * @returns {string} */ +module.exports = function globParent(str, opts) { + var options = Object.assign({ flipBackslashes: true }, opts); -const braces = (input, options = {}) => { - let output = []; - - if (Array.isArray(input)) { - for (let pattern of input) { - let result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); + // flip windows path separators + if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { + str = str.replace(backslash, slash); } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * // braces.parse(pattern, [, options]); - * const ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * ``` - * @param {String} pattern Brace pattern to parse - * @param {Object} options - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = (input, options = {}) => parse(input, options); - -/** - * Creates a braces string from an AST, or an AST node. - * - * ```js - * const braces = require('braces'); - * let ast = braces.parse('foo/{a,b}/bar'); - * console.log(stringify(ast.nodes[2])); //=> '{a,b}' - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.stringify = (input, options = {}) => { - if (typeof input === 'string') { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); -}; - -/** - * Compiles a brace pattern into a regex-compatible, optimized string. - * This method is called by the main [braces](#braces) function by default. - * - * ```js - * const braces = require('braces'); - * console.log(braces.compile('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `input` Brace pattern or AST. - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.compile = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); - } - return compile(input, options); -}; - -/** - * Expands a brace pattern into an array. This method is called by the - * main [braces](#braces) function when `options.expand` is true. Before - * using this method it's recommended that you read the [performance notes](#performance)) - * and advantages of using [.compile](#compile) instead. - * - * ```js - * const braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = (input, options = {}) => { - if (typeof input === 'string') { - input = braces.parse(input, options); + // special case for strings ending in enclosure containing path separator + if (enclosure.test(str)) { + str += slash; } - let result = expand(input, options); + // preserves full path in case of trailing path separator + str += 'a'; - // filter out empty strings if specified - if (options.noempty === true) { - result = result.filter(Boolean); - } - - // filter out duplicates if specified - if (options.nodupes === true) { - result = [...new Set(result)]; - } - - return result; -}; - -/** - * Processes a brace pattern and returns either an expanded array - * (if `options.expand` is true), a highly optimized regex-compatible string. - * This method is called by the main [braces](#braces) function. - * - * ```js - * const braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = (input, options = {}) => { - if (input === '' || input.length < 3) { - return [input]; - } - - return options.expand !== true - ? braces.compile(input, options) - : braces.expand(input, options); -}; - -/** - * Expose "braces" - */ - -module.exports = braces; - - -/***/ }), - -/***/ 7123: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fill = __nccwpck_require__(791); -const utils = __nccwpck_require__(7691); - -const compile = (ast, options = {}) => { - let walk = (node, parent = {}) => { - let invalidBlock = utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let invalid = invalidBlock === true || invalidNode === true; - let prefix = options.escapeInvalid === true ? '\\' : ''; - let output = ''; - - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - return prefix + node.value; - } - - if (node.type === 'open') { - return invalid ? (prefix + node.value) : '('; - } - - if (node.type === 'close') { - return invalid ? (prefix + node.value) : ')'; - } - - if (node.type === 'comma') { - return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|'); - } - - if (node.value) { - return node.value; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - let range = fill(...args, { ...options, wrap: false, toRegex: true }); - - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - - if (node.nodes) { - for (let child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - - return walk(ast); -}; - -module.exports = compile; - - -/***/ }), - -/***/ 5412: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - MAX_LENGTH: 1024 * 64, - - // Digits - CHAR_0: '0', /* 0 */ - CHAR_9: '9', /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 'A', /* A */ - CHAR_LOWERCASE_A: 'a', /* a */ - CHAR_UPPERCASE_Z: 'Z', /* Z */ - CHAR_LOWERCASE_Z: 'z', /* z */ - - CHAR_LEFT_PARENTHESES: '(', /* ( */ - CHAR_RIGHT_PARENTHESES: ')', /* ) */ - - CHAR_ASTERISK: '*', /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: '&', /* & */ - CHAR_AT: '@', /* @ */ - CHAR_BACKSLASH: '\\', /* \ */ - CHAR_BACKTICK: '`', /* ` */ - CHAR_CARRIAGE_RETURN: '\r', /* \r */ - CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ - CHAR_COLON: ':', /* : */ - CHAR_COMMA: ',', /* , */ - CHAR_DOLLAR: '$', /* . */ - CHAR_DOT: '.', /* . */ - CHAR_DOUBLE_QUOTE: '"', /* " */ - CHAR_EQUAL: '=', /* = */ - CHAR_EXCLAMATION_MARK: '!', /* ! */ - CHAR_FORM_FEED: '\f', /* \f */ - CHAR_FORWARD_SLASH: '/', /* / */ - CHAR_HASH: '#', /* # */ - CHAR_HYPHEN_MINUS: '-', /* - */ - CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ - CHAR_LEFT_CURLY_BRACE: '{', /* { */ - CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ - CHAR_LINE_FEED: '\n', /* \n */ - CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ - CHAR_PERCENT: '%', /* % */ - CHAR_PLUS: '+', /* + */ - CHAR_QUESTION_MARK: '?', /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ - CHAR_RIGHT_CURLY_BRACE: '}', /* } */ - CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ - CHAR_SEMICOLON: ';', /* ; */ - CHAR_SINGLE_QUOTE: '\'', /* ' */ - CHAR_SPACE: ' ', /* */ - CHAR_TAB: '\t', /* \t */ - CHAR_UNDERSCORE: '_', /* _ */ - CHAR_VERTICAL_LINE: '|', /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ -}; - - -/***/ }), - -/***/ 6944: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fill = __nccwpck_require__(791); -const stringify = __nccwpck_require__(4810); -const utils = __nccwpck_require__(7691); - -const append = (queue = '', stash = '', enclose = false) => { - let result = []; - - queue = [].concat(queue); - stash = [].concat(stash); - - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; - } - - for (let item of queue) { - if (Array.isArray(item)) { - for (let value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele)); - } - } - } - return utils.flatten(result); -}; - -const expand = (ast, options = {}) => { - let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit; - - let walk = (node, parent = {}) => { - node.queue = []; - - let p = parent; - let q = parent.queue; - - while (p.type !== 'brace' && p.type !== 'root' && p.parent) { - p = p.parent; - q = p.queue; - } - - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - - if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ['{}'])); - return; - } - - if (node.nodes && node.ranges > 0) { - let args = utils.reduce(node.nodes); - - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - - let enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - - while (block.type !== 'brace' && block.type !== 'root' && block.parent) { - block = block.parent; - queue = block.queue; - } - - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - - if (child.type === 'comma' && node.type === 'brace') { - if (i === 1) queue.push(''); - queue.push(''); - continue; - } - - if (child.type === 'close') { - q.push(append(q.pop(), queue, enclose)); - continue; - } - - if (child.value && child.type !== 'open') { - queue.push(append(queue.pop(), child.value)); - continue; - } - - if (child.nodes) { - walk(child, node); - } - } - - return queue; - }; - - return utils.flatten(walk(ast)); -}; - -module.exports = expand; - - -/***/ }), - -/***/ 9889: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const stringify = __nccwpck_require__(4810); - -/** - * Constants - */ - -const { - MAX_LENGTH, - CHAR_BACKSLASH, /* \ */ - CHAR_BACKTICK, /* ` */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_RIGHT_SQUARE_BRACKET, /* ] */ - CHAR_DOUBLE_QUOTE, /* " */ - CHAR_SINGLE_QUOTE, /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE -} = __nccwpck_require__(5412); - -/** - * parse - */ - -const parse = (input, options = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - let opts = options || {}; - let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - - let ast = { type: 'root', input, nodes: [] }; - let stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - let length = input.length; - let index = 0; - let depth = 0; - let value; - let memo = {}; - - /** - * Helpers - */ - - const advance = () => input[index++]; - const push = node => { - if (node.type === 'text' && prev.type === 'dot') { - prev.type = 'text'; - } - - if (prev && prev.type === 'text' && node.type === 'text') { - prev.value += node.value; - return; - } - - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - - push({ type: 'bos' }); - - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - - /** - * Invalid chars - */ - - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - - /** - * Escaped chars - */ - - if (value === CHAR_BACKSLASH) { - push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); - continue; - } - - /** - * Right square bracket (literal): ']' - */ - - if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: 'text', value: '\\' + value }); - continue; - } - - /** - * Left square bracket: '[' - */ - - if (value === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - - let closed = true; - let next; - - while (index < length && (next = advance())) { - value += next; - - if (next === CHAR_LEFT_SQUARE_BRACKET) { - brackets++; - continue; - } - - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - brackets--; - - if (brackets === 0) { - break; - } - } - } - - push({ type: 'text', value }); - continue; - } - - /** - * Parentheses - */ - - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: 'paren', nodes: [] }); - stack.push(block); - push({ type: 'text', value }); - continue; - } - - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== 'paren') { - push({ type: 'text', value }); - continue; - } - block = stack.pop(); - push({ type: 'text', value }); - block = stack[stack.length - 1]; - continue; - } - - /** - * Quotes: '|"|` - */ - - if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { - let open = value; - let next; - - if (options.keepQuotes !== true) { - value = ''; - } - - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - - value += next; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Left curly brace: '{' - */ - - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - - let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; - let brace = { - type: 'brace', - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - - block = push(brace); - stack.push(block); - push({ type: 'open', value }); - continue; - } - - /** - * Right curly brace: '}' - */ - - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== 'brace') { - push({ type: 'text', value }); - continue; - } - - let type = 'close'; - block = stack.pop(); - block.close = true; - - push({ type, value }); - depth--; - - block = stack[stack.length - 1]; - continue; - } - - /** - * Comma: ',' - */ - - if (value === CHAR_COMMA && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - let open = block.nodes.shift(); - block.nodes = [open, { type: 'text', value: stringify(block) }]; - } - - push({ type: 'comma', value }); - block.commas++; - continue; - } - - /** - * Dot: '.' - */ - - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - let siblings = block.nodes; - - if (depth === 0 || siblings.length === 0) { - push({ type: 'text', value }); - continue; - } - - if (prev.type === 'dot') { - block.range = []; - prev.value += value; - prev.type = 'range'; - - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = 'text'; - continue; - } - - block.ranges++; - block.args = []; - continue; - } - - if (prev.type === 'range') { - siblings.pop(); - - let before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - - push({ type: 'dot', value }); - continue; - } - - /** - * Text - */ - - push({ type: 'text', value }); - } - - // Mark imbalanced braces and brackets as invalid + // remove path parts that are globby do { - block = stack.pop(); + str = pathPosixDirname(str); + } while (isGlob(str) || globby.test(str)); - if (block.type !== 'root') { - block.nodes.forEach(node => { - if (!node.nodes) { - if (node.type === 'open') node.isOpen = true; - if (node.type === 'close') node.isClose = true; - if (!node.nodes) node.type = 'text'; - node.invalid = true; - } - }); - - // get the location of the block on parent.nodes (block's siblings) - let parent = stack[stack.length - 1]; - let index = parent.nodes.indexOf(block); - // replace the (invalid) block with it's nodes - parent.nodes.splice(index, 1, ...block.nodes); - } - } while (stack.length > 0); - - push({ type: 'eos' }); - return ast; + // remove escape chars and return result + return str.replace(escaped, '$1'); }; -module.exports = parse; - /***/ }), -/***/ 4810: +/***/ 5648: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - -const utils = __nccwpck_require__(7691); - -module.exports = (ast, options = {}) => { - let stringify = (node, parent = {}) => { - let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - let invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ''; - - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return '\\' + node.value; - } - return node.value; - } - - if (node.value) { - return node.value; - } - - if (node.nodes) { - for (let child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - - return stringify(ast); -}; - - - -/***/ }), - -/***/ 7691: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.isInteger = num => { - if (typeof num === 'number') { - return Number.isInteger(num); - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isInteger(Number(num)); - } - return false; -}; - -/** - * Find a node of the given type - */ - -exports.find = (node, type) => node.nodes.find(node => node.type === type); - -/** - * Find a node of the given type - */ - -exports.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports.isInteger(min) || !exports.isInteger(max)) return false; - return ((Number(max) - Number(min)) / Number(step)) >= limit; -}; - -/** - * Escape the given node with '\\' before node.value - */ - -exports.escapeNode = (block, n = 0, type) => { - let node = block.nodes[n]; - if (!node) return; - - if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { - if (node.escaped !== true) { - node.value = '\\' + node.value; - node.escaped = true; - } - } -}; - -/** - * Returns true if the given brace node should be enclosed in literal braces - */ - -exports.encloseBrace = node => { - if (node.type !== 'brace') return false; - if ((node.commas >> 0 + node.ranges >> 0) === 0) { - node.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a brace node is invalid. - */ - -exports.isInvalidBrace = block => { - if (block.type !== 'brace') return false; - if (block.invalid === true || block.dollar) return true; - if ((block.commas >> 0 + block.ranges >> 0) === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; -}; - -/** - * Returns true if a node is an open or close node - */ - -exports.isOpenOrClose = node => { - if (node.type === 'open' || node.type === 'close') { - return true; - } - return node.open === true || node.close === true; -}; - -/** - * Reduce an array of text nodes. - */ - -exports.reduce = nodes => nodes.reduce((acc, node) => { - if (node.type === 'text') acc.push(node.value); - if (node.type === 'range') node.type = 'text'; - return acc; -}, []); - -/** - * Flatten an array - */ - -exports.flatten = (...args) => { - const result = []; - const flat = arr => { - for (let i = 0; i < arr.length; i++) { - let ele = arr[i]; - Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele); - } - return result; - }; - flat(args); - return result; -}; - - -/***/ }), - -/***/ 791: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -const util = __nccwpck_require__(1669); -const toRegexRange = __nccwpck_require__(6867); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; - - -/***/ }), - -/***/ 2840: -/***/ ((module) => { - -"use strict"; -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; - - -/***/ }), - -/***/ 3913: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(1669); -const braces = __nccwpck_require__(5582); -const picomatch = __nccwpck_require__(8569); -const utils = __nccwpck_require__(479); -const isEmptyString = val => typeof val === 'string' && (val === '' || val === './'); - -/** - * Returns an array of strings that match one or more glob patterns. - * - * ```js - * const mm = require('micromatch'); - * // mm(list, patterns[, options]); - * - * console.log(mm(['a.js', 'a.txt'], ['*.js'])); - * //=> [ 'a.js' ] - * ``` - * @param {String|Array} list List of strings to match. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} options See available [options](#options) - * @return {Array} Returns an array of matches - * @summary false - * @api public - */ - -const micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - - let omit = new Set(); - let keep = new Set(); - let items = new Set(); - let negatives = 0; - - let onResult = state => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - - for (let item of list) { - let matched = isMatch(item, true); - - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter(item => !omit.has(item)); - - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(', ')}"`); - } - - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; - } - } - - return matches; -}; - -/** - * Backwards compatibility - */ - -micromatch.match = micromatch; - -/** - * Returns a matcher function from the given glob `pattern` and `options`. - * The returned function takes a string to match as its only argument and returns - * true if the string is a match. - * - * ```js - * const mm = require('micromatch'); - * // mm.matcher(pattern[, options]); - * - * const isMatch = mm.matcher('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @param {String} `pattern` Glob pattern - * @param {Object} `options` - * @return {Function} Returns a matcher function. - * @api public - */ - -micromatch.matcher = (pattern, options) => picomatch(pattern, options); - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const mm = require('micromatch'); - * // mm.isMatch(string, patterns[, options]); - * - * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(mm.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Backwards compatibility - */ - -micromatch.any = micromatch.isMatch; - -/** - * Returns a list of strings that _**do not match any**_ of the given `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.not(list, patterns[, options]); - * - * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); - * //=> ['b.b', 'c.c'] - * ``` - * @param {Array} `list` Array of strings to match. - * @param {String|Array} `patterns` One or more glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Array} Returns an array of strings that **do not match** the given patterns. - * @api public - */ - -micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = new Set(); - let items = []; - - let onResult = state => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - - let matches = micromatch(list, patterns, { ...options, onResult }); - - for (let item of items) { - if (!matches.includes(item)) { - result.add(item); - } - } - return [...result]; -}; - -/** - * Returns true if the given `string` contains the given pattern. Similar - * to [.isMatch](#isMatch) but the pattern can match any part of the string. - * - * ```js - * var mm = require('micromatch'); - * // mm.contains(string, pattern[, options]); - * - * console.log(mm.contains('aa/bb/cc', '*b')); - * //=> true - * console.log(mm.contains('aa/bb/cc', '*d')); - * //=> false - * ``` - * @param {String} `str` The string to match. - * @param {String|Array} `patterns` Glob pattern to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if the patter matches any part of `str`. - * @api public - */ - -micromatch.contains = (str, pattern, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - if (Array.isArray(pattern)) { - return pattern.some(p => micromatch.contains(str, p, options)); - } - - if (typeof pattern === 'string') { - if (isEmptyString(str) || isEmptyString(pattern)) { - return false; - } - - if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { - return true; - } - } - - return micromatch.isMatch(str, pattern, { ...options, contains: true }); -}; - -/** - * Filter the keys of the given object with the given `glob` pattern - * and `options`. Does not attempt to match nested keys. If you need this feature, - * use [glob-object][] instead. - * - * ```js - * const mm = require('micromatch'); - * // mm.matchKeys(object, patterns[, options]); - * - * const obj = { aa: 'a', ab: 'b', ac: 'c' }; - * console.log(mm.matchKeys(obj, '*b')); - * //=> { ab: 'b' } - * ``` - * @param {Object} `object` The object with keys to filter. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Object} Returns an object with only keys that match the given patterns. - * @api public - */ - -micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError('Expected the first argument to be an object'); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; -}; - -/** - * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.some(list, patterns[, options]); - * - * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // true - * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some(item => isMatch(item))) { - return true; - } - } - return false; -}; - -/** - * Returns true if every string in the given `list` matches - * any of the given glob `patterns`. - * - * ```js - * const mm = require('micromatch'); - * // mm.every(list, patterns[, options]); - * - * console.log(mm.every('foo.js', ['foo.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); - * // true - * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); - * // false - * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); - * // false - * ``` - * @param {String|Array} `list` The string or array of strings to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every(item => isMatch(item))) { - return false; - } - } - return true; -}; - -/** - * Returns true if **all** of the given `patterns` match - * the specified string. - * - * ```js - * const mm = require('micromatch'); - * // mm.all(string, patterns[, options]); - * - * console.log(mm.all('foo.js', ['foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); - * // false - * - * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); - * // true - * - * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); - * // true - * ``` - * @param {String|Array} `str` The string to test. - * @param {String|Array} `patterns` One or more glob patterns to use for matching. - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -micromatch.all = (str, patterns, options) => { - if (typeof str !== 'string') { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); - } - - return [].concat(patterns).every(p => picomatch(p, options)(str)); -}; - -/** - * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. - * - * ```js - * const mm = require('micromatch'); - * // mm.capture(pattern, string[, options]); - * - * console.log(mm.capture('test/*.js', 'test/foo.js')); - * //=> ['foo'] - * console.log(mm.capture('test/*.js', 'foo/bar.css')); - * //=> null - * ``` - * @param {String} `glob` Glob pattern to use for matching. - * @param {String} `input` String to match - * @param {Object} `options` See available [options](#options) for changing how matches are performed - * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`. - * @api public - */ - -micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - - if (match) { - return match.slice(1).map(v => v === void 0 ? '' : v); - } -}; - -/** - * Create a regular expression from the given glob `pattern`. - * - * ```js - * const mm = require('micromatch'); - * // mm.makeRe(pattern[, options]); - * - * console.log(mm.makeRe('*.js')); - * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ - * ``` - * @param {String} `pattern` A glob pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -micromatch.makeRe = (...args) => picomatch.makeRe(...args); - -/** - * Scan a glob pattern to separate the pattern into segments. Used - * by the [split](#split) method. - * - * ```js - * const mm = require('micromatch'); - * const state = mm.scan(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -micromatch.scan = (...args) => picomatch.scan(...args); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const mm = require('micromatch'); - * const state = mm(pattern[, options]); - * ``` - * @param {String} `glob` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as regex source string. - * @api public - */ - -micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options)) { - res.push(picomatch.parse(str, options)); - } - } - return res; -}; - -/** - * Process the given brace `pattern`. - * - * ```js - * const { braces } = require('micromatch'); - * console.log(braces('foo/{a,b,c}/bar')); - * //=> [ 'foo/(a|b|c)/bar' ] - * - * console.log(braces('foo/{a,b,c}/bar', { expand: true })); - * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] - * ``` - * @param {String} `pattern` String with brace pattern to process. - * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. - * @return {Array} - * @api public - */ - -micromatch.braces = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) { - return [pattern]; - } - return braces(pattern, options); -}; - -/** - * Expand braces - */ - -micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== 'string') throw new TypeError('Expected a string'); - return micromatch.braces(pattern, { ...options, expand: true }); -}; - -/** - * Expose micromatch - */ - -module.exports = micromatch; - - -/***/ }), - -/***/ 6867: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ - - - -const isNumber = __nccwpck_require__(2840); - -const toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError('toRegexRange: expected the first argument to be a number'); - } - - if (max === void 0 || min === max) { - return String(min); - } - - if (isNumber(max) === false) { - throw new TypeError('toRegexRange: expected the second argument to be a number.'); - } - - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === 'boolean') { - opts.relaxZeros = opts.strictZeros === false; - } - - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; - - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - - let a = Math.min(min, max); - let b = Math.max(min, max); - - if (Math.abs(a - b) === 1) { - let result = min + '|' + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { - state.result = `(?:${state.result})`; - } - - toRegexRange.cache[cacheKey] = state; - return state.result; -}; - -function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; - let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; - let intersected = filterPatterns(neg, pos, '-?', true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join('|'); -} - -function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - - let stop = countNines(min, nines); - let stops = new Set([max]); - - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - - stop = countZeros(max + 1, zeros) - 1; - - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - - stops = [...stops]; - stops.sort(compare); - return stops; -} - -/** - * Convert a range to a regex pattern - * @param {Number} `start` - * @param {Number} `stop` - * @return {String} - */ - -function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ''; - let count = 0; - - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - - if (startDigit === stopDigit) { - pattern += startDigit; - - } else if (startDigit !== '0' || stopDigit !== '9') { - pattern += toCharacterClass(startDigit, stopDigit, options); - - } else { - count++; - } - } - - if (count) { - pattern += options.shorthand === true ? '\\d' : '[0-9]'; - } - - return { pattern, count: [count], digits }; -} - -function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - - for (let i = 0; i < ranges.length; i++) { - let max = ranges[i]; - let obj = rangeToPattern(String(start), String(max), options); - let zeros = ''; - - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max + 1; - continue; - } - - if (tok.isPadded) { - zeros = padZeros(max, tok, options); - } - - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max + 1; - prev = obj; - } - - return tokens; -} - -function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - - for (let ele of arr) { - let { string } = ele; - - // only push if _both_ are negative... - if (!intersection && !contains(comparison, 'string', string)) { - result.push(prefix + string); - } - - // or _both_ are positive - if (intersection && contains(comparison, 'string', string)) { - result.push(prefix + string); - } - } - return result; -} - -/** - * Zip strings - */ - -function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; -} - -function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; -} - -function contains(arr, key, val) { - return arr.some(ele => ele[key] === val); -} - -function countNines(min, len) { - return Number(String(min).slice(0, -len) + '9'.repeat(len)); -} - -function countZeros(integer, zeros) { - return integer - (integer % Math.pow(10, zeros)); -} - -function toQuantifier(digits) { - let [start = 0, stop = ''] = digits; - if (stop || start > 1) { - return `{${start + (stop ? ',' + stop : '')}}`; - } - return ''; -} - -function toCharacterClass(a, b, options) { - return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; -} - -function hasPadding(str) { - return /^-?(0+)\d/.test(str); -} - -function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - - switch (diff) { - case 0: - return ''; - case 1: - return relax ? '0?' : '0'; - case 2: - return relax ? '0{0,2}' : '00'; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } -} - -/** - * Cache - */ - -toRegexRange.cache = {}; -toRegexRange.clearCache = () => (toRegexRange.cache = {}); - -/** - * Expose `toRegexRange` - */ - -module.exports = toRegexRange; - - -/***/ }), - -/***/ 3664: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const taskManager = __nccwpck_require__(2708); -const async_1 = __nccwpck_require__(5679); -const stream_1 = __nccwpck_require__(4630); -const sync_1 = __nccwpck_require__(2405); -const settings_1 = __nccwpck_require__(952); -const utils = __nccwpck_require__(5444); +const taskManager = __nccwpck_require__(6599); +const async_1 = __nccwpck_require__(645); +const stream_1 = __nccwpck_require__(1969); +const sync_1 = __nccwpck_require__(5894); +const settings_1 = __nccwpck_require__(879); +const utils = __nccwpck_require__(6002); async function FastGlob(source, options) { assertPatternsInput(source); const works = getWorks(source, async_1.default, options); @@ -14129,6 +17035,10 @@ async function FastGlob(source, options) { // https://github.com/typescript-eslint/typescript-eslint/issues/60 // eslint-disable-next-line no-redeclare (function (FastGlob) { + FastGlob.glob = FastGlob; + FastGlob.globSync = sync; + FastGlob.globStream = stream; + FastGlob.async = FastGlob; function sync(source, options) { assertPatternsInput(source); const works = getWorks(source, sync_1.default, options); @@ -14164,6 +17074,37 @@ async function FastGlob(source, options) { return utils.path.escape(source); } FastGlob.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPathToPattern(source); + } + FastGlob.convertPathToPattern = convertPathToPattern; + let posix; + (function (posix) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapePosixPath(source); + } + posix.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertPosixPathToPattern(source); + } + posix.convertPathToPattern = convertPathToPattern; + })(posix = FastGlob.posix || (FastGlob.posix = {})); + let win32; + (function (win32) { + function escapePath(source) { + assertPatternsInput(source); + return utils.path.escapeWindowsPath(source); + } + win32.escapePath = escapePath; + function convertPathToPattern(source) { + assertPatternsInput(source); + return utils.path.convertWindowsPathToPattern(source); + } + win32.convertPathToPattern = convertPathToPattern; + })(win32 = FastGlob.win32 || (FastGlob.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { const patterns = [].concat(source); @@ -14184,17 +17125,19 @@ module.exports = FastGlob; /***/ }), -/***/ 2708: +/***/ 6599: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0; -const utils = __nccwpck_require__(5444); -function generate(patterns, settings) { +const utils = __nccwpck_require__(6002); +function generate(input, settings) { + const patterns = processPatterns(input, settings); + const ignore = processPatterns(settings.ignore, settings); const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore); + const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false); @@ -14202,15 +17145,58 @@ function generate(patterns, settings) { return staticTasks.concat(dynamicTasks); } exports.generate = generate; -function convertPatternsToTasks(positive, negative, dynamic) { - const positivePatternsGroup = groupPatternsByBaseDirectory(positive); - // When we have a global group – there is no reason to divide the patterns into independent tasks. - // In this case, the global task covers the rest. - if ('.' in positivePatternsGroup) { - const task = convertPatternGroupToTask('.', positive, negative, dynamic); - return [task]; +function processPatterns(input, settings) { + let patterns = input; + /** + * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry + * and some problems with the micromatch package (see fast-glob issues: #365, #394). + * + * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown + * in matching in the case of a large set of patterns after expansion. + */ + if (settings.braceExpansion) { + patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); } - return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic); + /** + * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used + * at any nesting level. + * + * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change + * the pattern in the filter before creating a regular expression. There is no need to change the patterns + * in the application. Only on the input. + */ + if (settings.baseNameMatch) { + patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`); + } + /** + * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion. + */ + return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); +} +/** + * Returns tasks grouped by basic pattern directories. + * + * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. + * This is necessary because directory traversal starts at the base directory and goes deeper. + */ +function convertPatternsToTasks(positive, negative, dynamic) { + const tasks = []; + const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); + const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); + const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); + const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); + tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); + /* + * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory + * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest. + */ + if ('.' in insideCurrentDirectoryGroup) { + tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic)); + } + else { + tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); + } + return tasks; } exports.convertPatternsToTasks = convertPatternsToTasks; function getPositivePatterns(patterns) { @@ -14257,29 +17243,24 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask; /***/ }), -/***/ 5679: +/***/ 645: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2083); -const provider_1 = __nccwpck_require__(257); +const async_1 = __nccwpck_require__(2907); +const provider_1 = __nccwpck_require__(7792); class ProviderAsync extends provider_1.default { constructor() { super(...arguments); - this._reader = new stream_1.default(this._settings); + this._reader = new async_1.default(this._settings); } - read(task) { + async read(task) { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); - const entries = []; - return new Promise((resolve, reject) => { - const stream = this.api(root, task, options); - stream.once('error', reject); - stream.on('data', (entry) => entries.push(options.transform(entry))); - stream.once('end', () => resolve(entries)); - }); + const entries = await this.api(root, task, options); + return entries.map((entry) => options.transform(entry)); } api(root, task, options) { if (task.dynamic) { @@ -14288,19 +17269,19 @@ class ProviderAsync extends provider_1.default { return this._reader.static(task.patterns, options); } } -exports.default = ProviderAsync; +exports["default"] = ProviderAsync; /***/ }), -/***/ 6983: +/***/ 3591: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(5444); -const partial_1 = __nccwpck_require__(5295); +const utils = __nccwpck_require__(6002); +const partial_1 = __nccwpck_require__(5740); class DeepFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -14358,18 +17339,18 @@ class DeepFilter { return !utils.pattern.matchAny(entryPath, patternsRe); } } -exports.default = DeepFilter; +exports["default"] = DeepFilter; /***/ }), -/***/ 1343: +/***/ 4285: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(5444); +const utils = __nccwpck_require__(6002); class EntryFilter { constructor(_settings, _micromatchOptions) { this._settings = _settings; @@ -14377,32 +17358,37 @@ class EntryFilter { this.index = new Map(); } getFilter(positive, negative) { - const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions); - const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions); - return (entry) => this._filter(entry, positiveRe, negativeRe); + const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); + const patterns = { + positive: { + all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) + }, + negative: { + absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), + relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) + } + }; + return (entry) => this._filter(entry, patterns); } - _filter(entry, positiveRe, negativeRe) { - if (this._settings.unique && this._isDuplicateEntry(entry)) { + _filter(entry, patterns) { + const filepath = utils.path.removeLeadingDotSegment(entry.path); + if (this._settings.unique && this._isDuplicateEntry(filepath)) { return false; } if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { return false; } - if (this._isSkippedByAbsoluteNegativePatterns(entry.path, negativeRe)) { - return false; - } - const filepath = this._settings.baseNameMatch ? entry.name : entry.path; - const isMatched = this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe); + const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); if (this._settings.unique && isMatched) { - this._createIndexRecord(entry); + this._createIndexRecord(filepath); } return isMatched; } - _isDuplicateEntry(entry) { - return this.index.has(entry.path); + _isDuplicateEntry(filepath) { + return this.index.has(filepath); } - _createIndexRecord(entry) { - this.index.set(entry.path, undefined); + _createIndexRecord(filepath) { + this.index.set(filepath, undefined); } _onlyFileFilter(entry) { return this._settings.onlyFiles && !entry.dirent.isFile(); @@ -14410,30 +17396,54 @@ class EntryFilter { _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) { - if (!this._settings.absolute) { + _isMatchToPatternsSet(filepath, patterns, isDirectory) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + if (!isMatched) { return false; } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); - return utils.pattern.matchAny(fullpath, patternsRe); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + if (isMatchedByRelativeNegative) { + return false; + } + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + if (isMatchedByAbsoluteNegative) { + return false; + } + return true; } - _isMatchToPatterns(entryPath, patternsRe) { - const filepath = utils.path.removeLeadingDotSegment(entryPath); - return utils.pattern.matchAny(filepath, patternsRe); + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) { + return false; + } + const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + } + _isMatchToPatterns(filepath, patternsRe, isDirectory) { + if (patternsRe.length === 0) { + return false; + } + // Trying to match files and directories by patterns. + const isMatched = utils.pattern.matchAny(filepath, patternsRe); + // A pattern with a trailling slash can be used for directory matching. + // To apply such pattern, we need to add a tralling slash to the path. + if (!isMatched && isDirectory) { + return utils.pattern.matchAny(filepath + '/', patternsRe); + } + return isMatched; } } -exports.default = EntryFilter; +exports["default"] = EntryFilter; /***/ }), -/***/ 6654: +/***/ 1587: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(5444); +const utils = __nccwpck_require__(6002); class ErrorFilter { constructor(_settings) { this._settings = _settings; @@ -14445,18 +17455,18 @@ class ErrorFilter { return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; } } -exports.default = ErrorFilter; +exports["default"] = ErrorFilter; /***/ }), -/***/ 2576: +/***/ 208: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(5444); +const utils = __nccwpck_require__(6002); class Matcher { constructor(_patterns, _settings, _micromatchOptions) { this._patterns = _patterns; @@ -14466,12 +17476,7 @@ class Matcher { this._fillStorage(); } _fillStorage() { - /** - * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level). - * So, before expand patterns with brace expansion into separated patterns. - */ - const patterns = utils.pattern.expandPatternsWithBraceExpansion(this._patterns); - for (const pattern of patterns) { + for (const pattern of this._patterns) { const segments = this._getPatternSegments(pattern); const sections = this._splitSegmentsIntoSections(segments); this._storage.push({ @@ -14503,18 +17508,18 @@ class Matcher { return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); } } -exports.default = Matcher; +exports["default"] = Matcher; /***/ }), -/***/ 5295: +/***/ 5740: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const matcher_1 = __nccwpck_require__(2576); +const matcher_1 = __nccwpck_require__(208); class PartialMatcher extends matcher_1.default { match(filepath) { const parts = filepath.split('/'); @@ -14549,22 +17554,22 @@ class PartialMatcher extends matcher_1.default { return false; } } -exports.default = PartialMatcher; +exports["default"] = PartialMatcher; /***/ }), -/***/ 257: +/***/ 7792: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(5622); -const deep_1 = __nccwpck_require__(6983); -const entry_1 = __nccwpck_require__(1343); -const error_1 = __nccwpck_require__(6654); -const entry_2 = __nccwpck_require__(4029); +const path = __nccwpck_require__(6928); +const deep_1 = __nccwpck_require__(3591); +const entry_1 = __nccwpck_require__(4285); +const error_1 = __nccwpck_require__(1587); +const entry_2 = __nccwpck_require__(7094); class Provider { constructor(_settings) { this._settings = _settings; @@ -14605,20 +17610,20 @@ class Provider { }; } } -exports.default = Provider; +exports["default"] = Provider; /***/ }), -/***/ 4630: +/***/ 1969: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2413); -const stream_2 = __nccwpck_require__(2083); -const provider_1 = __nccwpck_require__(257); +const stream_1 = __nccwpck_require__(2203); +const stream_2 = __nccwpck_require__(87); +const provider_1 = __nccwpck_require__(7792); class ProviderStream extends provider_1.default { constructor() { super(...arguments); @@ -14644,19 +17649,19 @@ class ProviderStream extends provider_1.default { return this._reader.static(task.patterns, options); } } -exports.default = ProviderStream; +exports["default"] = ProviderStream; /***/ }), -/***/ 2405: +/***/ 5894: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const sync_1 = __nccwpck_require__(8821); -const provider_1 = __nccwpck_require__(257); +const sync_1 = __nccwpck_require__(264); +const provider_1 = __nccwpck_require__(7792); class ProviderSync extends provider_1.default { constructor() { super(...arguments); @@ -14675,18 +17680,18 @@ class ProviderSync extends provider_1.default { return this._reader.static(task.patterns, options); } } -exports.default = ProviderSync; +exports["default"] = ProviderSync; /***/ }), -/***/ 4029: +/***/ 7094: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils = __nccwpck_require__(5444); +const utils = __nccwpck_require__(6002); class EntryTransformer { constructor(_settings) { this._settings = _settings; @@ -14709,20 +17714,63 @@ class EntryTransformer { return Object.assign(Object.assign({}, entry), { path: filepath }); } } -exports.default = EntryTransformer; +exports["default"] = EntryTransformer; /***/ }), -/***/ 8062: +/***/ 2907: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const path = __nccwpck_require__(5622); -const fsStat = __nccwpck_require__(109); -const utils = __nccwpck_require__(5444); +const fsWalk = __nccwpck_require__(9337); +const reader_1 = __nccwpck_require__(1824); +const stream_1 = __nccwpck_require__(87); +class ReaderAsync extends reader_1.default { + constructor() { + super(...arguments); + this._walkAsync = fsWalk.walk; + this._readerStream = new stream_1.default(this._settings); + } + dynamic(root, options) { + return new Promise((resolve, reject) => { + this._walkAsync(root, options, (error, entries) => { + if (error === null) { + resolve(entries); + } + else { + reject(error); + } + }); + }); + } + async static(patterns, options) { + const entries = []; + const stream = this._readerStream.static(patterns, options); + // After #235, replace it with an asynchronous iterator. + return new Promise((resolve, reject) => { + stream.once('error', reject); + stream.on('data', (entry) => entries.push(entry)); + stream.once('end', () => resolve(entries)); + }); + } +} +exports["default"] = ReaderAsync; + + +/***/ }), + +/***/ 1824: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const path = __nccwpck_require__(6928); +const fsStat = __nccwpck_require__(1470); +const utils = __nccwpck_require__(6002); class Reader { constructor(_settings) { this._settings = _settings; @@ -14750,21 +17798,21 @@ class Reader { return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; } } -exports.default = Reader; +exports["default"] = Reader; /***/ }), -/***/ 2083: +/***/ 87: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const stream_1 = __nccwpck_require__(2413); -const fsStat = __nccwpck_require__(109); -const fsWalk = __nccwpck_require__(6026); -const reader_1 = __nccwpck_require__(8062); +const stream_1 = __nccwpck_require__(2203); +const fsStat = __nccwpck_require__(1470); +const fsWalk = __nccwpck_require__(9337); +const reader_1 = __nccwpck_require__(1824); class ReaderStream extends reader_1.default { constructor() { super(...arguments); @@ -14813,20 +17861,20 @@ class ReaderStream extends reader_1.default { }); } } -exports.default = ReaderStream; +exports["default"] = ReaderStream; /***/ }), -/***/ 8821: +/***/ 264: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const fsStat = __nccwpck_require__(109); -const fsWalk = __nccwpck_require__(6026); -const reader_1 = __nccwpck_require__(8062); +const fsStat = __nccwpck_require__(1470); +const fsWalk = __nccwpck_require__(9337); +const reader_1 = __nccwpck_require__(1824); class ReaderSync extends reader_1.default { constructor() { super(...arguments); @@ -14864,20 +17912,20 @@ class ReaderSync extends reader_1.default { return this._statSync(filepath, this._fsStatSettings); } } -exports.default = ReaderSync; +exports["default"] = ReaderSync; /***/ }), -/***/ 952: +/***/ 879: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; -const fs = __nccwpck_require__(5747); -const os = __nccwpck_require__(2087); +const fs = __nccwpck_require__(9896); +const os = __nccwpck_require__(857); /** * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero. * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107 @@ -14921,6 +17969,8 @@ class Settings { if (this.stats) { this.objectMode = true; } + // Remove the cast to the array in the next major (#404). + this.ignore = [].concat(this.ignore); } _getValue(option, value) { return option === undefined ? value : option; @@ -14929,12 +17979,12 @@ class Settings { return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods); } } -exports.default = Settings; +exports["default"] = Settings; /***/ }), -/***/ 5325: +/***/ 5711: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -14964,7 +18014,7 @@ exports.splitWhen = splitWhen; /***/ }), -/***/ 1230: +/***/ 9718: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -14979,7 +18029,7 @@ exports.isEnoentCodeError = isEnoentCodeError; /***/ }), -/***/ 7543: +/***/ 6979: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -15006,41 +18056,60 @@ exports.createDirentFromStats = createDirentFromStats; /***/ }), -/***/ 5444: +/***/ 6002: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0; -const array = __nccwpck_require__(5325); +const array = __nccwpck_require__(5711); exports.array = array; -const errno = __nccwpck_require__(1230); +const errno = __nccwpck_require__(9718); exports.errno = errno; -const fs = __nccwpck_require__(7543); +const fs = __nccwpck_require__(6979); exports.fs = fs; -const path = __nccwpck_require__(3873); +const path = __nccwpck_require__(9283); exports.path = path; -const pattern = __nccwpck_require__(1221); +const pattern = __nccwpck_require__(1304); exports.pattern = pattern; -const stream = __nccwpck_require__(8382); +const stream = __nccwpck_require__(536); exports.stream = stream; -const string = __nccwpck_require__(2203); +const string = __nccwpck_require__(7641); exports.string = string; /***/ }), -/***/ 3873: +/***/ 9283: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0; -const path = __nccwpck_require__(5622); +exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; +const os = __nccwpck_require__(857); +const path = __nccwpck_require__(6928); +const IS_WINDOWS_PLATFORM = os.platform() === 'win32'; const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\ -const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g; +/** + * All non-escaped special characters. + * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters. + * Windows: (){}[], !+@ before (, ! at the beginning. + */ +const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; +const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; +/** + * The device path (\\.\ or \\?\). + * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths + */ +const DOS_DEVICE_PATH_RE = /^\\\\([.?])/; +/** + * All backslashes except those escaping special characters. + * Windows: !()+@{} + * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions + */ +const WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; /** * Designed to work only with simple paths: `dir\\file`. */ @@ -15052,10 +18121,6 @@ function makeAbsolute(cwd, filepath) { return path.resolve(cwd, filepath); } exports.makeAbsolute = makeAbsolute; -function escape(pattern) { - return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); -} -exports.escape = escape; function removeLeadingDotSegment(entry) { // We do not use `startsWith` because this is 10x slower than current implementation for some cases. // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with @@ -15068,28 +18133,52 @@ function removeLeadingDotSegment(entry) { return entry; } exports.removeLeadingDotSegment = removeLeadingDotSegment; +exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; +function escapeWindowsPath(pattern) { + return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); +} +exports.escapeWindowsPath = escapeWindowsPath; +function escapePosixPath(pattern) { + return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\$2'); +} +exports.escapePosixPath = escapePosixPath; +exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; +function convertWindowsPathToPattern(filepath) { + return escapeWindowsPath(filepath) + .replace(DOS_DEVICE_PATH_RE, '//$1') + .replace(WINDOWS_BACKSLASHES_RE, '/'); +} +exports.convertWindowsPathToPattern = convertWindowsPathToPattern; +function convertPosixPathToPattern(filepath) { + return escapePosixPath(filepath); +} +exports.convertPosixPathToPattern = convertPosixPathToPattern; /***/ }), -/***/ 1221: +/***/ 1304: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; -const path = __nccwpck_require__(5622); -const globParent = __nccwpck_require__(4655); -const micromatch = __nccwpck_require__(3913); -const picomatch = __nccwpck_require__(8569); +exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; +const path = __nccwpck_require__(6928); +const globParent = __nccwpck_require__(8188); +const micromatch = __nccwpck_require__(8785); const GLOBSTAR = '**'; const ESCAPE_SYMBOL = '\\'; const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; -const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[.*]/; -const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\(.*\|.*\)/; -const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\(.*\)/; -const BRACE_EXPANSIONS_SYMBOLS_RE = /{.*(?:,|\.\.).*}/; +const REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; +const REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; +const GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; +const BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; +/** + * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string. + * The latter is due to the presence of the device path at the beginning of the UNC path. + */ +const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { return !isDynamicPattern(pattern, options); } @@ -15116,12 +18205,24 @@ function isDynamicPattern(pattern, options = {}) { if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { return true; } - if (options.braceExpansion !== false && BRACE_EXPANSIONS_SYMBOLS_RE.test(pattern)) { + if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { return true; } return false; } exports.isDynamicPattern = isDynamicPattern; +function hasBraceExpansion(pattern) { + const openingBraceIndex = pattern.indexOf('{'); + if (openingBraceIndex === -1) { + return false; + } + const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1); + if (closingBraceIndex === -1) { + return false; + } + const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); + return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); +} function convertToPositivePattern(pattern) { return isNegativePattern(pattern) ? pattern.slice(1) : pattern; } @@ -15146,6 +18247,32 @@ function getPositivePatterns(patterns) { return patterns.filter(isPositivePattern); } exports.getPositivePatterns = getPositivePatterns; +/** + * Returns patterns that can be applied inside the current directory. + * + * @example + * // ['./*', '*', 'a/*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +function getPatternsInsideCurrentDirectory(patterns) { + return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); +} +exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; +/** + * Returns patterns to be expanded relative to (outside) the current directory. + * + * @example + * // ['../*', './../*'] + * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*']) + */ +function getPatternsOutsideCurrentDirectory(patterns) { + return patterns.filter(isPatternRelatedToParentDirectory); +} +exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; +function isPatternRelatedToParentDirectory(pattern) { + return pattern.startsWith('..') || pattern.startsWith('./..'); +} +exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; function getBaseDirectory(pattern) { return globParent(pattern, { flipBackslashes: false }); } @@ -15170,14 +18297,20 @@ function expandPatternsWithBraceExpansion(patterns) { } exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; function expandBraceExpansion(pattern) { - return micromatch.braces(pattern, { - expand: true, - nodupes: true - }); + const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); + /** + * Sort the patterns by length so that the same depth patterns are processed side by side. + * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']` + */ + patterns.sort((a, b) => a.length - b.length); + /** + * Micromatch can return an empty string in the case of patterns like `{a,}`. + */ + return patterns.filter((pattern) => pattern !== ''); } exports.expandBraceExpansion = expandBraceExpansion; function getPatternParts(pattern, options) { - let { parts } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); + let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); /** * The scan method returns an empty array in some cases. * See micromatch/picomatch#58 for more details. @@ -15208,18 +18341,44 @@ function matchAny(entry, patternsRe) { return patternsRe.some((patternRe) => patternRe.test(entry)); } exports.matchAny = matchAny; +/** + * This package only works with forward slashes as a path separator. + * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes. + */ +function removeDuplicateSlashes(pattern) { + return pattern.replace(DOUBLE_SLASH_RE, '/'); +} +exports.removeDuplicateSlashes = removeDuplicateSlashes; +function partitionAbsoluteAndRelative(patterns) { + const absolute = []; + const relative = []; + for (const pattern of patterns) { + if (isAbsolute(pattern)) { + absolute.push(pattern); + } + else { + relative.push(pattern); + } + } + return [absolute, relative]; +} +exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; +function isAbsolute(pattern) { + return path.isAbsolute(pattern); +} +exports.isAbsolute = isAbsolute; /***/ }), -/***/ 8382: +/***/ 536: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.merge = void 0; -const merge2 = __nccwpck_require__(2578); +const merge2 = __nccwpck_require__(754); function merge(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { @@ -15237,7 +18396,7 @@ function propagateCloseEventToSources(streams) { /***/ }), -/***/ 2203: +/***/ 7641: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -15256,13 +18415,15 @@ exports.isEmpty = isEmpty; /***/ }), -/***/ 7340: +/***/ 8230: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -var reusify = __nccwpck_require__(2113) +/* eslint-disable no-var */ + +var reusify = __nccwpck_require__(844) function fastqueue (context, worker, concurrency) { if (typeof context === 'function') { @@ -15462,67 +18623,358 @@ function Task () { } } +function queueAsPromised (context, worker, concurrency) { + if (typeof context === 'function') { + concurrency = worker + worker = context + context = null + } + + function asyncWrapper (arg, cb) { + worker.call(this, arg) + .then(function (res) { + cb(null, res) + }, cb) + } + + var queue = fastqueue(context, asyncWrapper, concurrency) + + var pushCb = queue.push + var unshiftCb = queue.unshift + + queue.push = push + queue.unshift = unshift + queue.drained = drained + + return queue + + function push (value) { + var p = new Promise(function (resolve, reject) { + pushCb(value, function (err, result) { + if (err) { + reject(err) + return + } + resolve(result) + }) + }) + + // Let's fork the promise chain to + // make the error bubble up to the user but + // not lead to a unhandledRejection + p.catch(noop) + + return p + } + + function unshift (value) { + var p = new Promise(function (resolve, reject) { + unshiftCb(value, function (err, result) { + if (err) { + reject(err) + return + } + resolve(result) + }) + }) + + // Let's fork the promise chain to + // make the error bubble up to the user but + // not lead to a unhandledRejection + p.catch(noop) + + return p + } + + function drained () { + if (queue.idle()) { + return new Promise(function (resolve) { + resolve() + }) + } + + var previousDrain = queue.drain + + var p = new Promise(function (resolve) { + queue.drain = function () { + previousDrain() + resolve() + } + }) + + return p + } +} + module.exports = fastqueue +module.exports.promise = queueAsPromised /***/ }), -/***/ 4655: +/***/ 877: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; - - -var isGlob = __nccwpck_require__(4466); -var pathPosixDirname = __nccwpck_require__(5622).posix.dirname; -var isWin32 = __nccwpck_require__(2087).platform() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\/]*.*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - // preserves full path in case of trailing path separator - str += 'a'; +const util = __nccwpck_require__(9023); +const toRegexRange = __nccwpck_require__(7551); - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - // remove escape chars and return result - return str.replace(escaped, '$1'); +const transform = toNumber => { + return value => toNumber === true ? Number(value) : String(value); }; +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options, maxLen) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +module.exports = fill; + /***/ }), -/***/ 6457: +/***/ 7814: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const types_1 = __nccwpck_require__(4597); +const types_1 = __nccwpck_require__(4707); function createRejection(error, ...beforeErrorGroups) { const promise = (async () => { if (error instanceof types_1.RequestError) { @@ -15549,12 +19001,12 @@ function createRejection(error, ...beforeErrorGroups) { promise.on = returnPromise; return promise; } -exports.default = createRejection; +exports["default"] = createRejection; /***/ }), -/***/ 6056: +/***/ 2126: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -15570,15 +19022,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const events_1 = __nccwpck_require__(8614); -const is_1 = __nccwpck_require__(7678); -const PCancelable = __nccwpck_require__(9072); -const types_1 = __nccwpck_require__(4597); -const parse_body_1 = __nccwpck_require__(8220); -const core_1 = __nccwpck_require__(94); -const proxy_events_1 = __nccwpck_require__(3021); -const get_buffer_1 = __nccwpck_require__(4500); -const is_response_ok_1 = __nccwpck_require__(9298); +const events_1 = __nccwpck_require__(4434); +const is_1 = __nccwpck_require__(4001); +const PCancelable = __nccwpck_require__(4533); +const types_1 = __nccwpck_require__(4707); +const parse_body_1 = __nccwpck_require__(5494); +const core_1 = __nccwpck_require__(6825); +const proxy_events_1 = __nccwpck_require__(7813); +const get_buffer_1 = __nccwpck_require__(4858); +const is_response_ok_1 = __nccwpck_require__(4350); const proxiedRequestEvents = [ 'request', 'response', @@ -15673,11 +19125,12 @@ function asPromise(normalizedOptions) { request._beforeError(new types_1.RequestError(error.message, error, request)); return; } + globalResponse = response; if (!is_response_ok_1.isResponseOk(response)) { request._beforeError(new types_1.HTTPError(response)); return; } - globalResponse = response; + request.destroy(); resolve(request.options.resolveBodyOnly ? response.body : response); }); const onError = (error) => { @@ -15731,19 +19184,19 @@ function asPromise(normalizedOptions) { promise.text = () => shortcut('text'); return promise; } -exports.default = asPromise; -__exportStar(__nccwpck_require__(4597), exports); +exports["default"] = asPromise; +__exportStar(__nccwpck_require__(4707), exports); /***/ }), -/***/ 1048: +/***/ 6364: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(7678); +const is_1 = __nccwpck_require__(4001); const normalizeArguments = (options, defaults) => { if (is_1.default.null_(options.encoding)) { throw new TypeError('To get a Buffer, set `options.responseType` to `buffer` instead'); @@ -15818,18 +19271,18 @@ const normalizeArguments = (options, defaults) => { } return options; }; -exports.default = normalizeArguments; +exports["default"] = normalizeArguments; /***/ }), -/***/ 8220: +/***/ 5494: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const types_1 = __nccwpck_require__(4597); +const types_1 = __nccwpck_require__(4707); const parseBody = (response, responseType, parseJson, encoding) => { const { rawBody } = response; try { @@ -15851,12 +19304,12 @@ const parseBody = (response, responseType, parseJson, encoding) => { throw new types_1.ParseError(error, response); } }; -exports.default = parseBody; +exports["default"] = parseBody; /***/ }), -/***/ 4597: +/***/ 4707: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -15873,7 +19326,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CancelError = exports.ParseError = void 0; -const core_1 = __nccwpck_require__(94); +const core_1 = __nccwpck_require__(6825); /** An error to be thrown when server response code is 2xx, and parsing body fails. Includes a `response` property. @@ -15883,6 +19336,7 @@ class ParseError extends core_1.RequestError { const { options } = response.request; super(`${error.message} in "${options.url.toString()}"`, error, response.request); this.name = 'ParseError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_BODY_PARSE_FAILURE' : this.code; } } exports.ParseError = ParseError; @@ -15893,18 +19347,19 @@ class CancelError extends core_1.RequestError { constructor(request) { super('Promise was canceled', {}, request); this.name = 'CancelError'; + this.code = 'ERR_CANCELED'; } get isCanceled() { return true; } } exports.CancelError = CancelError; -__exportStar(__nccwpck_require__(94), exports); +__exportStar(__nccwpck_require__(6825), exports); /***/ }), -/***/ 3462: +/***/ 3024: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -15936,47 +19391,47 @@ const calculateRetryDelay = ({ attemptCount, retryOptions, error, retryAfter }) const noise = Math.random() * 100; return ((2 ** (attemptCount - 1)) * 1000) + noise; }; -exports.default = calculateRetryDelay; +exports["default"] = calculateRetryDelay; /***/ }), -/***/ 94: +/***/ 6825: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.UnsupportedProtocolError = exports.ReadError = exports.TimeoutError = exports.UploadError = exports.CacheError = exports.HTTPError = exports.MaxRedirectsError = exports.RequestError = exports.setNonEnumerableProperties = exports.knownHookEvents = exports.withoutBody = exports.kIsNormalizedAlready = void 0; -const util_1 = __nccwpck_require__(1669); -const stream_1 = __nccwpck_require__(2413); -const fs_1 = __nccwpck_require__(5747); -const url_1 = __nccwpck_require__(8835); -const http = __nccwpck_require__(8605); -const http_1 = __nccwpck_require__(8605); -const https = __nccwpck_require__(7211); -const http_timer_1 = __nccwpck_require__(8097); -const cacheable_lookup_1 = __nccwpck_require__(2286); -const CacheableRequest = __nccwpck_require__(8116); -const decompressResponse = __nccwpck_require__(2391); +const util_1 = __nccwpck_require__(9023); +const stream_1 = __nccwpck_require__(2203); +const fs_1 = __nccwpck_require__(9896); +const url_1 = __nccwpck_require__(7016); +const http = __nccwpck_require__(8611); +const http_1 = __nccwpck_require__(8611); +const https = __nccwpck_require__(5692); +const http_timer_1 = __nccwpck_require__(4480); +const cacheable_lookup_1 = __nccwpck_require__(2417); +const CacheableRequest = __nccwpck_require__(1487); +const decompressResponse = __nccwpck_require__(1373); // @ts-expect-error Missing types -const http2wrapper = __nccwpck_require__(4645); -const lowercaseKeys = __nccwpck_require__(9662); -const is_1 = __nccwpck_require__(7678); -const get_body_size_1 = __nccwpck_require__(4564); -const is_form_data_1 = __nccwpck_require__(40); -const proxy_events_1 = __nccwpck_require__(3021); -const timed_out_1 = __nccwpck_require__(2454); -const url_to_options_1 = __nccwpck_require__(8026); -const options_to_url_1 = __nccwpck_require__(9219); -const weakable_map_1 = __nccwpck_require__(7288); -const get_buffer_1 = __nccwpck_require__(4500); -const dns_ip_version_1 = __nccwpck_require__(4993); -const is_response_ok_1 = __nccwpck_require__(9298); -const deprecation_warning_1 = __nccwpck_require__(397); -const normalize_arguments_1 = __nccwpck_require__(1048); -const calculate_retry_delay_1 = __nccwpck_require__(3462); -const globalDnsCache = new cacheable_lookup_1.default(); +const http2wrapper = __nccwpck_require__(4956); +const lowercaseKeys = __nccwpck_require__(1364); +const is_1 = __nccwpck_require__(4001); +const get_body_size_1 = __nccwpck_require__(9296); +const is_form_data_1 = __nccwpck_require__(6751); +const proxy_events_1 = __nccwpck_require__(7813); +const timed_out_1 = __nccwpck_require__(4501); +const url_to_options_1 = __nccwpck_require__(3873); +const options_to_url_1 = __nccwpck_require__(5743); +const weakable_map_1 = __nccwpck_require__(7791); +const get_buffer_1 = __nccwpck_require__(4858); +const dns_ip_version_1 = __nccwpck_require__(1037); +const is_response_ok_1 = __nccwpck_require__(4350); +const deprecation_warning_1 = __nccwpck_require__(9796); +const normalize_arguments_1 = __nccwpck_require__(6364); +const calculate_retry_delay_1 = __nccwpck_require__(3024); +let globalDnsCache; const kRequest = Symbol('request'); const kResponse = Symbol('response'); const kResponseSize = Symbol('responseSize'); @@ -16068,11 +19523,11 @@ Contains a `code` property with error class code, like `ECONNREFUSED`. */ class RequestError extends Error { constructor(message, error, self) { - var _a; + var _a, _b; super(message); Error.captureStackTrace(this, this.constructor); this.name = 'RequestError'; - this.code = error.code; + this.code = (_a = error.code) !== null && _a !== void 0 ? _a : 'ERR_GOT_REQUEST_ERROR'; if (self instanceof Request) { Object.defineProperty(this, 'request', { enumerable: false, @@ -16097,7 +19552,7 @@ class RequestError extends Error { value: self }); } - this.timings = (_a = this.request) === null || _a === void 0 ? void 0 : _a.timings; + this.timings = (_b = this.request) === null || _b === void 0 ? void 0 : _b.timings; // Recover the original stacktrace if (is_1.default.string(error.stack) && is_1.default.string(this.stack)) { const indexOfMessage = this.stack.indexOf(this.message) + this.message.length; @@ -16120,6 +19575,7 @@ class MaxRedirectsError extends RequestError { constructor(request) { super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request); this.name = 'MaxRedirectsError'; + this.code = 'ERR_TOO_MANY_REDIRECTS'; } } exports.MaxRedirectsError = MaxRedirectsError; @@ -16131,6 +19587,7 @@ class HTTPError extends RequestError { constructor(response) { super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request); this.name = 'HTTPError'; + this.code = 'ERR_NON_2XX_3XX_RESPONSE'; } } exports.HTTPError = HTTPError; @@ -16142,6 +19599,7 @@ class CacheError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'CacheError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code; } } exports.CacheError = CacheError; @@ -16152,6 +19610,7 @@ class UploadError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'UploadError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code; } } exports.UploadError = UploadError; @@ -16175,6 +19634,7 @@ class ReadError extends RequestError { constructor(error, request) { super(error.message, error, request); this.name = 'ReadError'; + this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code; } } exports.ReadError = ReadError; @@ -16185,6 +19645,7 @@ class UnsupportedProtocolError extends RequestError { constructor(options) { super(`Unsupported protocol "${options.url.protocol}"`, {}, options); this.name = 'UnsupportedProtocolError'; + this.code = 'ERR_UNSUPPORTED_PROTOCOL'; } } exports.UnsupportedProtocolError = UnsupportedProtocolError; @@ -16533,6 +19994,9 @@ class Request extends stream_1.Duplex { options.cacheOptions = { ...options.cacheOptions }; // `options.dnsCache` if (options.dnsCache === true) { + if (!globalDnsCache) { + globalDnsCache = new cacheable_lookup_1.default(); + } options.dnsCache = globalDnsCache; } else if (!is_1.default.undefined(options.dnsCache) && !options.dnsCache.lookup) { @@ -16804,6 +20268,14 @@ class Request extends stream_1.Duplex { const redirectUrl = new url_1.URL(redirectBuffer, url); const redirectString = redirectUrl.toString(); decodeURI(redirectString); + // eslint-disable-next-line no-inner-declarations + function isUnixSocketURL(url) { + return url.protocol === 'unix:' || url.hostname === 'unix'; + } + if (!isUnixSocketURL(url) && isUnixSocketURL(redirectUrl)) { + this._beforeError(new RequestError('Cannot redirect to UNIX socket', {}, this)); + return; + } // Redirecting to a different site, clear sensitive data. if (redirectUrl.hostname !== url.hostname || redirectUrl.port !== url.port) { if ('host' in options.headers) { @@ -17432,12 +20904,12 @@ class Request extends stream_1.Duplex { return this; } } -exports.default = Request; +exports["default"] = Request; /***/ }), -/***/ 4993: +/***/ 1037: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17462,18 +20934,18 @@ exports.dnsLookupIpVersionToFamily = (dnsLookupIpVersion) => { /***/ }), -/***/ 4564: +/***/ 9296: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const fs_1 = __nccwpck_require__(5747); -const util_1 = __nccwpck_require__(1669); -const is_1 = __nccwpck_require__(7678); -const is_form_data_1 = __nccwpck_require__(40); +const fs_1 = __nccwpck_require__(9896); +const util_1 = __nccwpck_require__(9023); +const is_1 = __nccwpck_require__(4001); +const is_form_data_1 = __nccwpck_require__(6751); const statAsync = util_1.promisify(fs_1.stat); -exports.default = async (body, headers) => { +exports["default"] = async (body, headers) => { if (headers && 'content-length' in headers) { return Number(headers['content-length']); } @@ -17502,7 +20974,7 @@ exports.default = async (body, headers) => { /***/ }), -/***/ 4500: +/***/ 4858: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17521,24 +20993,24 @@ const getBuffer = async (stream) => { } return Buffer.from(chunks.join('')); }; -exports.default = getBuffer; +exports["default"] = getBuffer; /***/ }), -/***/ 40: +/***/ 6751: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(7678); -exports.default = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); +const is_1 = __nccwpck_require__(4001); +exports["default"] = (body) => is_1.default.nodeStream(body) && is_1.default.function_(body.getBoundary); /***/ }), -/***/ 9298: +/***/ 4350: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17554,14 +21026,14 @@ exports.isResponseOk = (response) => { /***/ }), -/***/ 9219: +/***/ 5743: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /* istanbul ignore file: deprecated */ -const url_1 = __nccwpck_require__(8835); +const url_1 = __nccwpck_require__(7016); const keys = [ 'protocol', 'host', @@ -17570,7 +21042,7 @@ const keys = [ 'pathname', 'search' ]; -exports.default = (origin, options) => { +exports["default"] = (origin, options) => { var _a, _b; if (options.path) { if (options.pathname) { @@ -17615,7 +21087,7 @@ exports.default = (origin, options) => { /***/ }), -/***/ 3021: +/***/ 7813: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17635,20 +21107,20 @@ function default_1(from, to, events) { } }; } -exports.default = default_1; +exports["default"] = default_1; /***/ }), -/***/ 2454: +/***/ 4501: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.TimeoutError = void 0; -const net = __nccwpck_require__(1631); -const unhandle_1 = __nccwpck_require__(1593); +const net = __nccwpck_require__(9278); +const unhandle_1 = __nccwpck_require__(9246); const reentry = Symbol('reentry'); const noop = () => { }; class TimeoutError extends Error { @@ -17660,7 +21132,7 @@ class TimeoutError extends Error { } } exports.TimeoutError = TimeoutError; -exports.default = (request, delays, options) => { +exports["default"] = (request, delays, options) => { if (reentry in request) { return noop; } @@ -17769,7 +21241,7 @@ exports.default = (request, delays, options) => { /***/ }), -/***/ 1593: +/***/ 9246: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17779,7 +21251,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); // Especially if you do error handling and set timeouts. // So instead of checking if it's proper to throw an error on every timeout ever, // use this simple tool which will remove all listeners you have attached. -exports.default = () => { +exports["default"] = () => { const handlers = []; return { once(origin, event, fn) { @@ -17799,14 +21271,14 @@ exports.default = () => { /***/ }), -/***/ 8026: +/***/ 3873: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(7678); -exports.default = (url) => { +const is_1 = __nccwpck_require__(4001); +exports["default"] = (url) => { // Cast to URL url = url; const options = { @@ -17831,7 +21303,7 @@ exports.default = (url) => { /***/ }), -/***/ 7288: +/***/ 7791: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -17863,12 +21335,12 @@ class WeakableMap { return this.map.has(key); } } -exports.default = WeakableMap; +exports["default"] = WeakableMap; /***/ }), -/***/ 4337: +/***/ 9941: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -17885,11 +21357,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultHandler = void 0; -const is_1 = __nccwpck_require__(7678); -const as_promise_1 = __nccwpck_require__(6056); -const create_rejection_1 = __nccwpck_require__(6457); -const core_1 = __nccwpck_require__(94); -const deep_freeze_1 = __nccwpck_require__(285); +const is_1 = __nccwpck_require__(4001); +const as_promise_1 = __nccwpck_require__(2126); +const create_rejection_1 = __nccwpck_require__(7814); +const core_1 = __nccwpck_require__(6825); +const deep_freeze_1 = __nccwpck_require__(2949); const errors = { RequestError: as_promise_1.RequestError, CacheError: as_promise_1.CacheError, @@ -18110,13 +21582,13 @@ const create = (defaults) => { got.mergeOptions = mergeOptions; return got; }; -exports.default = create; -__exportStar(__nccwpck_require__(2613), exports); +exports["default"] = create; +__exportStar(__nccwpck_require__(9612), exports); /***/ }), -/***/ 3061: +/***/ 6757: /***/ (function(module, exports, __nccwpck_require__) { "use strict"; @@ -18132,8 +21604,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", ({ value: true })); -const url_1 = __nccwpck_require__(8835); -const create_1 = __nccwpck_require__(4337); +const url_1 = __nccwpck_require__(7016); +const create_1 = __nccwpck_require__(9941); const defaults = { options: { method: 'GET', @@ -18245,18 +21717,18 @@ const defaults = { mutableDefaults: false }; const got = create_1.default(defaults); -exports.default = got; +exports["default"] = got; // For CommonJS default export support module.exports = got; -module.exports.default = got; +module.exports["default"] = got; module.exports.__esModule = true; // Workaround for TS issue: https://github.com/sindresorhus/got/pull/1267 -__exportStar(__nccwpck_require__(4337), exports); -__exportStar(__nccwpck_require__(6056), exports); +__exportStar(__nccwpck_require__(9941), exports); +__exportStar(__nccwpck_require__(2126), exports); /***/ }), -/***/ 2613: +/***/ 9612: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -18266,13 +21738,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 285: +/***/ 2949: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -const is_1 = __nccwpck_require__(7678); +const is_1 = __nccwpck_require__(4001); function deepFreeze(object) { for (const value of Object.values(object)) { if (is_1.default.plainObject(value) || is_1.default.array(value)) { @@ -18281,19 +21753,19 @@ function deepFreeze(object) { } return Object.freeze(object); } -exports.default = deepFreeze; +exports["default"] = deepFreeze; /***/ }), -/***/ 397: +/***/ 9796: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); const alreadyWarned = new Set(); -exports.default = (message) => { +exports["default"] = (message) => { if (alreadyWarned.has(message)) { return; } @@ -18307,7 +21779,7 @@ exports.default = (message) => { /***/ }), -/***/ 1002: +/***/ 4584: /***/ ((module) => { "use strict"; @@ -18320,6 +21792,7 @@ const statusCodeCacheableByDefault = new Set([ 206, 300, 301, + 308, 404, 405, 410, @@ -18392,10 +21865,10 @@ function parseCacheControl(header) { // TODO: When there is more than one value present for a given directive (e.g., two Expires header fields, multiple Cache-Control: max-age directives), // the directive's value is considered invalid. Caches are encouraged to consider responses that have invalid freshness information to be stale - const parts = header.trim().split(/\s*,\s*/); // TODO: lame parsing + const parts = header.trim().split(/,/); for (const part of parts) { - const [k, v] = part.split(/\s*=\s*/, 2); - cc[k] = v === undefined ? true : v.replace(/^"|"$/g, ''); // TODO: lame unquoting + const [k, v] = part.split(/=/, 2); + cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); } return cc; @@ -18988,15 +22461,15 @@ module.exports = class CachePolicy { /***/ }), -/***/ 9898: +/***/ 685: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = __nccwpck_require__(8614); -const tls = __nccwpck_require__(4016); -const http2 = __nccwpck_require__(7565); -const QuickLRU = __nccwpck_require__(9273); +const EventEmitter = __nccwpck_require__(4434); +const tls = __nccwpck_require__(4756); +const http2 = __nccwpck_require__(5675); +const QuickLRU = __nccwpck_require__(5475); const kCurrentStreamsCount = Symbol('currentStreamsCount'); const kRequest = Symbol('request'); @@ -19666,18 +23139,18 @@ module.exports = { /***/ }), -/***/ 7167: +/***/ 9213: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const http = __nccwpck_require__(8605); -const https = __nccwpck_require__(7211); -const resolveALPN = __nccwpck_require__(6624); -const QuickLRU = __nccwpck_require__(9273); -const Http2ClientRequest = __nccwpck_require__(9632); -const calculateServerName = __nccwpck_require__(1982); -const urlToOptions = __nccwpck_require__(2686); +const http = __nccwpck_require__(8611); +const https = __nccwpck_require__(5692); +const resolveALPN = __nccwpck_require__(8824); +const QuickLRU = __nccwpck_require__(5475); +const Http2ClientRequest = __nccwpck_require__(7605); +const calculateServerName = __nccwpck_require__(2850); +const urlToOptions = __nccwpck_require__(4734); const cache = new QuickLRU({maxSize: 100}); const queue = new Map(); @@ -19823,18 +23296,18 @@ module.exports.protocolCache = cache; /***/ }), -/***/ 9632: +/***/ 7605: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const http2 = __nccwpck_require__(7565); -const {Writable} = __nccwpck_require__(2413); -const {Agent, globalAgent} = __nccwpck_require__(9898); -const IncomingMessage = __nccwpck_require__(2575); -const urlToOptions = __nccwpck_require__(2686); -const proxyEvents = __nccwpck_require__(1818); -const isRequestPseudoHeader = __nccwpck_require__(1199); +const http2 = __nccwpck_require__(5675); +const {Writable} = __nccwpck_require__(2203); +const {Agent, globalAgent} = __nccwpck_require__(685); +const IncomingMessage = __nccwpck_require__(2156); +const urlToOptions = __nccwpck_require__(4734); +const proxyEvents = __nccwpck_require__(118); +const isRequestPseudoHeader = __nccwpck_require__(6365); const { ERR_INVALID_ARG_TYPE, ERR_INVALID_PROTOCOL, @@ -19842,7 +23315,7 @@ const { ERR_INVALID_HTTP_TOKEN, ERR_HTTP_INVALID_HEADER_VALUE, ERR_INVALID_CHAR -} = __nccwpck_require__(7087); +} = __nccwpck_require__(9731); const { HTTP2_HEADER_STATUS, @@ -20276,12 +23749,12 @@ module.exports = ClientRequest; /***/ }), -/***/ 2575: +/***/ 2156: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const {Readable} = __nccwpck_require__(2413); +const {Readable} = __nccwpck_require__(2203); class IncomingMessage extends Readable { constructor(socket, highWaterMark) { @@ -20342,16 +23815,16 @@ module.exports = IncomingMessage; /***/ }), -/***/ 4645: +/***/ 4956: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const http2 = __nccwpck_require__(7565); -const agent = __nccwpck_require__(9898); -const ClientRequest = __nccwpck_require__(9632); -const IncomingMessage = __nccwpck_require__(2575); -const auto = __nccwpck_require__(7167); +const http2 = __nccwpck_require__(5675); +const agent = __nccwpck_require__(685); +const ClientRequest = __nccwpck_require__(7605); +const IncomingMessage = __nccwpck_require__(2156); +const auto = __nccwpck_require__(9213); const request = (url, options, callback) => { return new ClientRequest(url, options, callback); @@ -20378,12 +23851,12 @@ module.exports = { /***/ }), -/***/ 1982: +/***/ 2850: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const net = __nccwpck_require__(1631); +const net = __nccwpck_require__(9278); /* istanbul ignore file: https://github.com/nodejs/node/blob/v13.0.1/lib/_http_agent.js */ module.exports = options => { @@ -20413,7 +23886,7 @@ module.exports = options => { /***/ }), -/***/ 7087: +/***/ 9731: /***/ ((module) => { "use strict"; @@ -20466,7 +23939,7 @@ makeError(TypeError, 'ERR_INVALID_CHAR', args => { /***/ }), -/***/ 1199: +/***/ 6365: /***/ ((module) => { "use strict"; @@ -20487,7 +23960,7 @@ module.exports = header => { /***/ }), -/***/ 1818: +/***/ 118: /***/ ((module) => { "use strict"; @@ -20502,7 +23975,7 @@ module.exports = (from, to, events) => { /***/ }), -/***/ 2686: +/***/ 4734: /***/ ((module) => { "use strict"; @@ -20535,7 +24008,7 @@ module.exports = url => { /***/ }), -/***/ 6435: +/***/ 5540: /***/ ((module) => { /*! @@ -20562,7 +24035,7 @@ module.exports = function isExtglob(str) { /***/ }), -/***/ 4466: +/***/ 1925: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /*! @@ -20572,10 +24045,130 @@ module.exports = function isExtglob(str) { * Released under the MIT License. */ -var isExtglob = __nccwpck_require__(6435); +var isExtglob = __nccwpck_require__(5540); var chars = { '{': '}', '(': ')', '[': ']'}; -var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; -var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; module.exports = function isGlob(str, options) { if (typeof str !== 'string' || str === '') { @@ -20586,30 +24179,38 @@ module.exports = function isGlob(str, options) { return true; } - var regex = strictRegex; - var match; + var check = strictCheck; - // optionally relax regex + // optionally relax check if (options && options.strict === false) { - regex = relaxedRegex; + check = relaxedCheck; } - while ((match = regex.exec(str))) { - if (match[2]) return true; - var idx = match.index + match[0].length; + return check(str); +}; - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - var open = match[1]; - var close = open ? chars[open] : null; - if (open && close) { - var n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - str = str.slice(idx); +/***/ }), + +/***/ 3102: +/***/ ((module) => { + +"use strict"; +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); } return false; }; @@ -20617,7 +24218,7 @@ module.exports = function isGlob(str, options) { /***/ }), -/***/ 2820: +/***/ 5563: /***/ ((__unused_webpack_module, exports) => { //TODO: handle reviver/dehydrate function like normal @@ -20682,81 +24283,193 @@ exports.parse = function (s) { /***/ }), -/***/ 1531: +/***/ 6018: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const EventEmitter = __nccwpck_require__(8614); -const JSONB = __nccwpck_require__(2820); +const EventEmitter = __nccwpck_require__(4434); +const JSONB = __nccwpck_require__(5563); -const loadStore = opts => { +const loadStore = options => { const adapters = { redis: '@keyv/redis', + rediss: '@keyv/redis', mongodb: '@keyv/mongo', mongo: '@keyv/mongo', sqlite: '@keyv/sqlite', postgresql: '@keyv/postgres', postgres: '@keyv/postgres', - mysql: '@keyv/mysql' + mysql: '@keyv/mysql', + etcd: '@keyv/etcd', + offline: '@keyv/offline', + tiered: '@keyv/tiered', }; - if (opts.adapter || opts.uri) { - const adapter = opts.adapter || /^[^:]*/.exec(opts.uri)[0]; - return new (require(adapters[adapter]))(opts); + if (options.adapter || options.uri) { + const adapter = options.adapter || /^[^:+]*/.exec(options.uri)[0]; + return new (require(adapters[adapter]))(options); } return new Map(); }; +const iterableAdapters = [ + 'sqlite', + 'postgres', + 'mysql', + 'mongo', + 'redis', + 'tiered', +]; + class Keyv extends EventEmitter { - constructor(uri, opts) { + constructor(uri, {emitErrors = true, ...options} = {}) { super(); - this.opts = Object.assign( - { - namespace: 'keyv', - serialize: JSONB.stringify, - deserialize: JSONB.parse - }, - (typeof uri === 'string') ? { uri } : uri, - opts - ); + this.opts = { + namespace: 'keyv', + serialize: JSONB.stringify, + deserialize: JSONB.parse, + ...((typeof uri === 'string') ? {uri} : uri), + ...options, + }; if (!this.opts.store) { - const adapterOpts = Object.assign({}, this.opts); - this.opts.store = loadStore(adapterOpts); + const adapterOptions = {...this.opts}; + this.opts.store = loadStore(adapterOptions); } - if (typeof this.opts.store.on === 'function') { - this.opts.store.on('error', err => this.emit('error', err)); + if (this.opts.compression) { + const compression = this.opts.compression; + this.opts.serialize = compression.serialize.bind(compression); + this.opts.deserialize = compression.deserialize.bind(compression); + } + + if (typeof this.opts.store.on === 'function' && emitErrors) { + this.opts.store.on('error', error => this.emit('error', error)); } this.opts.store.namespace = this.opts.namespace; + + const generateIterator = iterator => async function * () { + for await (const [key, raw] of typeof iterator === 'function' + ? iterator(this.opts.store.namespace) + : iterator) { + const data = await this.opts.deserialize(raw); + if (this.opts.store.namespace && !key.includes(this.opts.store.namespace)) { + continue; + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + this.delete(key); + continue; + } + + yield [this._getKeyUnprefix(key), data.value]; + } + }; + + // Attach iterators + if (typeof this.opts.store[Symbol.iterator] === 'function' && this.opts.store instanceof Map) { + this.iterator = generateIterator(this.opts.store); + } else if (typeof this.opts.store.iterator === 'function' && this.opts.store.opts + && this._checkIterableAdaptar()) { + this.iterator = generateIterator(this.opts.store.iterator.bind(this.opts.store)); + } + } + + _checkIterableAdaptar() { + return iterableAdapters.includes(this.opts.store.opts.dialect) + || iterableAdapters.findIndex(element => this.opts.store.opts.url.includes(element)) >= 0; } _getKeyPrefix(key) { return `${this.opts.namespace}:${key}`; } - get(key, opts) { - const keyPrefixed = this._getKeyPrefix(key); - const { store } = this.opts; + _getKeyPrefixArray(keys) { + return keys.map(key => `${this.opts.namespace}:${key}`); + } + + _getKeyUnprefix(key) { + return key + .split(':') + .splice(1) + .join(':'); + } + + get(key, options) { + const {store} = this.opts; + const isArray = Array.isArray(key); + const keyPrefixed = isArray ? this._getKeyPrefixArray(key) : this._getKeyPrefix(key); + if (isArray && store.getMany === undefined) { + const promises = []; + for (const key of keyPrefixed) { + promises.push(Promise.resolve() + .then(() => store.get(key)) + .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) + .then(data => { + if (data === undefined || data === null) { + return undefined; + } + + if (typeof data.expires === 'number' && Date.now() > data.expires) { + return this.delete(key).then(() => undefined); + } + + return (options && options.raw) ? data : data.value; + }), + ); + } + + return Promise.allSettled(promises) + .then(values => { + const data = []; + for (const value of values) { + data.push(value.value); + } + + return data; + }); + } + return Promise.resolve() - .then(() => store.get(keyPrefixed)) + .then(() => isArray ? store.getMany(keyPrefixed) : store.get(keyPrefixed)) + .then(data => (typeof data === 'string') ? this.opts.deserialize(data) : (this.opts.compression ? this.opts.deserialize(data) : data)) .then(data => { - return (typeof data === 'string') ? this.opts.deserialize(data) : data; - }) - .then(data => { - if (data === undefined) { + if (data === undefined || data === null) { return undefined; } + if (isArray) { + const result = []; + + for (let row of data) { + if ((typeof row === 'string')) { + row = this.opts.deserialize(row); + } + + if (row === undefined || row === null) { + result.push(undefined); + continue; + } + + if (typeof row.expires === 'number' && Date.now() > row.expires) { + this.delete(key).then(() => undefined); + result.push(undefined); + } else { + result.push((options && options.raw) ? row : row.value); + } + } + + return result; + } + if (typeof data.expires === 'number' && Date.now() > data.expires) { - this.delete(key); - return undefined; + return this.delete(key).then(() => undefined); } - return (opts && opts.raw) ? data : data.value; + return (options && options.raw) ? data : data.value; }); } @@ -20770,12 +24483,16 @@ class Keyv extends EventEmitter { ttl = undefined; } - const { store } = this.opts; + const {store} = this.opts; return Promise.resolve() .then(() => { const expires = (typeof ttl === 'number') ? (Date.now() + ttl) : null; - value = { value, expires }; + if (typeof value === 'symbol') { + this.emit('error', 'symbol cannot be serialized'); + } + + value = {value, expires}; return this.opts.serialize(value); }) .then(value => store.set(keyPrefixed, value, ttl)) @@ -20783,17 +24500,54 @@ class Keyv extends EventEmitter { } delete(key) { + const {store} = this.opts; + if (Array.isArray(key)) { + const keyPrefixed = this._getKeyPrefixArray(key); + if (store.deleteMany === undefined) { + const promises = []; + for (const key of keyPrefixed) { + promises.push(store.delete(key)); + } + + return Promise.allSettled(promises) + .then(values => values.every(x => x.value === true)); + } + + return Promise.resolve() + .then(() => store.deleteMany(keyPrefixed)); + } + const keyPrefixed = this._getKeyPrefix(key); - const { store } = this.opts; return Promise.resolve() .then(() => store.delete(keyPrefixed)); } clear() { - const { store } = this.opts; + const {store} = this.opts; return Promise.resolve() .then(() => store.clear()); } + + has(key) { + const keyPrefixed = this._getKeyPrefix(key); + const {store} = this.opts; + return Promise.resolve() + .then(async () => { + if (typeof store.has === 'function') { + return store.has(keyPrefixed); + } + + const value = await store.get(keyPrefixed); + return value !== undefined; + }); + } + + disconnect() { + const {store} = this.opts; + if (typeof store.disconnect === 'function') { + return store.disconnect(); + } + } } module.exports = Keyv; @@ -20801,7 +24555,7 @@ module.exports = Keyv; /***/ }), -/***/ 9662: +/***/ 1364: /***/ ((module) => { "use strict"; @@ -20819,7 +24573,7 @@ module.exports = object => { /***/ }), -/***/ 2578: +/***/ 754: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; @@ -20831,7 +24585,7 @@ module.exports = object => { * Copyright (c) 2014-2020 Teambition * Licensed under the MIT license. */ -const Stream = __nccwpck_require__(2413) +const Stream = __nccwpck_require__(2203) const PassThrough = Stream.PassThrough const slice = Array.prototype.slice @@ -20971,2114 +24725,506 @@ function pauseStreams (streams, options) { /***/ }), -/***/ 2610: -/***/ ((module) => { +/***/ 8785: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// We define these manually to ensure they're always copied -// even if they would move up the prototype chain -// https://nodejs.org/api/http.html#http_class_http_incomingmessage -const knownProps = [ - 'destroy', - 'setTimeout', - 'socket', - 'headers', - 'trailers', - 'rawHeaders', - 'statusCode', - 'httpVersion', - 'httpVersionMinor', - 'httpVersionMajor', - 'rawTrailers', - 'statusMessage' -]; +const util = __nccwpck_require__(9023); +const braces = __nccwpck_require__(748); +const picomatch = __nccwpck_require__(6377); +const utils = __nccwpck_require__(8604); -module.exports = (fromStream, toStream) => { - const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); - - for (const prop of fromProps) { - // Don't overwrite existing properties - if (prop in toStream) { - continue; - } - - toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop]; - } +const isEmptyString = v => v === '' || v === './'; +const hasBraces = v => { + const index = v.indexOf('{'); + return index > -1 && v.indexOf('}', index) > -1; }; - -/***/ }), - -/***/ 467: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(__nccwpck_require__(2413)); -var http = _interopDefault(__nccwpck_require__(8605)); -var Url = _interopDefault(__nccwpck_require__(8835)); -var https = _interopDefault(__nccwpck_require__(7211)); -var zlib = _interopDefault(__nccwpck_require__(8761)); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - /** - * fetch-error.js + * Returns an array of strings that match one or more glob patterns. * - * FetchError interface for operational errors + * ```js + * const mm = require('micromatch'); + * // mm(list, patterns[, options]); + * + * console.log(mm(['a.js', 'a.txt'], ['*.js'])); + * //=> [ 'a.js' ] + * ``` + * @param {String|Array} `list` List of strings to match. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) + * @return {Array} Returns an array of matches + * @summary false + * @api public */ -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); +const micromatch = (list, patterns, options) => { + patterns = [].concat(patterns); + list = [].concat(list); - this.message = message; - this.type = type; + let omit = new Set(); + let keep = new Set(); + let items = new Set(); + let negatives = 0; - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; + let onResult = state => { + items.add(state.output); + if (options && options.onResult) { + options.onResult(state); + } + }; + + for (let i = 0; i < patterns.length; i++) { + let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); + let negated = isMatch.state.negated || isMatch.state.negatedExtglob; + if (negated) negatives++; + + for (let item of list) { + let matched = isMatch(item, true); + + let match = negated ? !matched.isMatch : matched.isMatch; + if (!match) continue; + + if (negated) { + omit.add(matched.output); + } else { + omit.delete(matched.output); + keep.add(matched.output); + } + } } - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} + let result = negatives === patterns.length ? [...items] : [...keep]; + let matches = result.filter(item => !omit.has(item)); -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; + if (options && matches.length === 0) { + if (options.failglob === true) { + throw new Error(`No matches found for "${patterns.join(', ')}"`); + } -let convert; -try { - convert = __nccwpck_require__(2877).convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; -const resolve_url = Url.resolve; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.default = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; - - -/***/ }), - -/***/ 7952: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -// TODO: Use the `URL` global when targeting Node.js 10 -const URLParser = typeof URL === 'undefined' ? __nccwpck_require__(8835).URL : URL; - -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs -const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; -const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; - -const testParameter = (name, filters) => { - return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); -}; - -const normalizeDataURL = (urlString, {stripHash}) => { - const parts = urlString.match(/^data:(.*?),(.*?)(?:#(.*))?$/); - - if (!parts) { - throw new Error(`Invalid URL: ${urlString}`); - } - - const mediaType = parts[1].split(';'); - const body = parts[2]; - const hash = stripHash ? '' : parts[3]; - - let base64 = false; - - if (mediaType[mediaType.length - 1] === 'base64') { - mediaType.pop(); - base64 = true; - } - - // Lowercase MIME type - const mimeType = (mediaType.shift() || '').toLowerCase(); - const attributes = mediaType - .map(attribute => { - let [key, value = ''] = attribute.split('=').map(string => string.trim()); - - // Lowercase `charset` - if (key === 'charset') { - value = value.toLowerCase(); - - if (value === DATA_URL_DEFAULT_CHARSET) { - return ''; - } - } - - return `${key}${value ? `=${value}` : ''}`; - }) - .filter(Boolean); - - const normalizedMediaType = [ - ...attributes - ]; - - if (base64) { - normalizedMediaType.push('base64'); - } - - if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { - normalizedMediaType.unshift(mimeType); - } - - return `data:${normalizedMediaType.join(';')},${base64 ? body.trim() : body}${hash ? `#${hash}` : ''}`; -}; - -const normalizeUrl = (urlString, options) => { - options = { - defaultProtocol: 'http:', - normalizeProtocol: true, - forceHttp: false, - forceHttps: false, - stripAuthentication: true, - stripHash: false, - stripWWW: true, - removeQueryParameters: [/^utm_\w+/i], - removeTrailingSlash: true, - removeDirectoryIndex: false, - sortQueryParameters: true, - ...options - }; - - // TODO: Remove this at some point in the future - if (Reflect.has(options, 'normalizeHttps')) { - throw new Error('options.normalizeHttps is renamed to options.forceHttp'); - } - - if (Reflect.has(options, 'normalizeHttp')) { - throw new Error('options.normalizeHttp is renamed to options.forceHttps'); - } - - if (Reflect.has(options, 'stripFragment')) { - throw new Error('options.stripFragment is renamed to options.stripHash'); - } - - urlString = urlString.trim(); - - // Data URL - if (/^data:/i.test(urlString)) { - return normalizeDataURL(urlString, options); - } - - const hasRelativeProtocol = urlString.startsWith('//'); - const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); - - // Prepend protocol - if (!isRelativeUrl) { - urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); - } - - const urlObj = new URLParser(urlString); - - if (options.forceHttp && options.forceHttps) { - throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); - } - - if (options.forceHttp && urlObj.protocol === 'https:') { - urlObj.protocol = 'http:'; - } - - if (options.forceHttps && urlObj.protocol === 'http:') { - urlObj.protocol = 'https:'; - } - - // Remove auth - if (options.stripAuthentication) { - urlObj.username = ''; - urlObj.password = ''; - } - - // Remove hash - if (options.stripHash) { - urlObj.hash = ''; - } - - // Remove duplicate slashes if not preceded by a protocol - if (urlObj.pathname) { - // TODO: Use the following instead when targeting Node.js 10 - // `urlObj.pathname = urlObj.pathname.replace(/(? { - if (/^(?!\/)/g.test(p1)) { - return `${p1}/`; - } - - return '/'; - }); - } - - // Decode URI octets - if (urlObj.pathname) { - urlObj.pathname = decodeURI(urlObj.pathname); - } - - // Remove directory index - if (options.removeDirectoryIndex === true) { - options.removeDirectoryIndex = [/^index\.[a-z]+$/]; - } - - if (Array.isArray(options.removeDirectoryIndex) && options.removeDirectoryIndex.length > 0) { - let pathComponents = urlObj.pathname.split('/'); - const lastComponent = pathComponents[pathComponents.length - 1]; - - if (testParameter(lastComponent, options.removeDirectoryIndex)) { - pathComponents = pathComponents.slice(0, pathComponents.length - 1); - urlObj.pathname = pathComponents.slice(1).join('/') + '/'; - } - } - - if (urlObj.hostname) { - // Remove trailing dot - urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); - - // Remove `www.` - if (options.stripWWW && /^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(urlObj.hostname)) { - // Each label should be max 63 at length (min: 2). - // The extension should be max 5 at length (min: 2). - // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names - urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); - } - } - - // Remove query unwanted parameters - if (Array.isArray(options.removeQueryParameters)) { - for (const key of [...urlObj.searchParams.keys()]) { - if (testParameter(key, options.removeQueryParameters)) { - urlObj.searchParams.delete(key); - } - } - } - - // Sort query parameters - if (options.sortQueryParameters) { - urlObj.searchParams.sort(); - } - - if (options.removeTrailingSlash) { - urlObj.pathname = urlObj.pathname.replace(/\/$/, ''); - } - - // Take advantage of many of the Node `url` normalizations - urlString = urlObj.toString(); - - // Remove ending `/` - if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '') { - urlString = urlString.replace(/\/$/, ''); - } - - // Restore relative protocol, if applicable - if (hasRelativeProtocol && !options.normalizeProtocol) { - urlString = urlString.replace(/^http:\/\//, '//'); - } - - // Remove http/https - if (options.stripProtocol) { - urlString = urlString.replace(/^(?:https?:)?\/\//, ''); - } - - return urlString; -}; - -module.exports = normalizeUrl; -// TODO: Remove this for the next major release -module.exports.default = normalizeUrl; - - -/***/ }), - -/***/ 1223: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(2940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) + if (options.nonull === true || options.nullglob === true) { + return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns; + } } - f.called = false - return f -} -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) + return matches; +}; + +/** + * Backwards compatibility + */ + +micromatch.match = micromatch; + +/** + * Returns a matcher function from the given glob `pattern` and `options`. + * The returned function takes a string to match as its only argument and returns + * true if the string is a match. + * + * ```js + * const mm = require('micromatch'); + * // mm.matcher(pattern[, options]); + * + * const isMatch = mm.matcher('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @param {String} `pattern` Glob pattern + * @param {Object} `options` + * @return {Function} Returns a matcher function. + * @api public + */ + +micromatch.matcher = (pattern, options) => picomatch(pattern, options); + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const mm = require('micromatch'); + * // mm.isMatch(string, patterns[, options]); + * + * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(mm.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `[options]` See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Backwards compatibility + */ + +micromatch.any = micromatch.isMatch; + +/** + * Returns a list of strings that _**do not match any**_ of the given `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.not(list, patterns[, options]); + * + * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a')); + * //=> ['b.b', 'c.c'] + * ``` + * @param {Array} `list` Array of strings to match. + * @param {String|Array} `patterns` One or more glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array} Returns an array of strings that **do not match** the given patterns. + * @api public + */ + +micromatch.not = (list, patterns, options = {}) => { + patterns = [].concat(patterns).map(String); + let result = new Set(); + let items = []; + + let onResult = state => { + if (options.onResult) options.onResult(state); + items.push(state.output); + }; + + let matches = new Set(micromatch(list, patterns, { ...options, onResult })); + + for (let item of items) { + if (!matches.has(item)) { + result.add(item); + } } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} + return [...result]; +}; + +/** + * Returns true if the given `string` contains the given pattern. Similar + * to [.isMatch](#isMatch) but the pattern can match any part of the string. + * + * ```js + * var mm = require('micromatch'); + * // mm.contains(string, pattern[, options]); + * + * console.log(mm.contains('aa/bb/cc', '*b')); + * //=> true + * console.log(mm.contains('aa/bb/cc', '*d')); + * //=> false + * ``` + * @param {String} `str` The string to match. + * @param {String|Array} `patterns` Glob pattern to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any of the patterns matches any part of `str`. + * @api public + */ + +micromatch.contains = (str, pattern, options) => { + if (typeof str !== 'string') { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + + if (Array.isArray(pattern)) { + return pattern.some(p => micromatch.contains(str, p, options)); + } + + if (typeof pattern === 'string') { + if (isEmptyString(str) || isEmptyString(pattern)) { + return false; + } + + if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) { + return true; + } + } + + return micromatch.isMatch(str, pattern, { ...options, contains: true }); +}; + +/** + * Filter the keys of the given object with the given `glob` pattern + * and `options`. Does not attempt to match nested keys. If you need this feature, + * use [glob-object][] instead. + * + * ```js + * const mm = require('micromatch'); + * // mm.matchKeys(object, patterns[, options]); + * + * const obj = { aa: 'a', ab: 'b', ac: 'c' }; + * console.log(mm.matchKeys(obj, '*b')); + * //=> { ab: 'b' } + * ``` + * @param {Object} `object` The object with keys to filter. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Object} Returns an object with only keys that match the given patterns. + * @api public + */ + +micromatch.matchKeys = (obj, patterns, options) => { + if (!utils.isObject(obj)) { + throw new TypeError('Expected the first argument to be an object'); + } + let keys = micromatch(Object.keys(obj), patterns, options); + let res = {}; + for (let key of keys) res[key] = obj[key]; + return res; +}; + +/** + * Returns true if some of the strings in the given `list` match any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.some(list, patterns[, options]); + * + * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // true + * console.log(mm.some(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list` + * @api public + */ + +micromatch.some = (list, patterns, options) => { + let items = [].concat(list); + + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (items.some(item => isMatch(item))) { + return true; + } + } + return false; +}; + +/** + * Returns true if every string in the given `list` matches + * any of the given glob `patterns`. + * + * ```js + * const mm = require('micromatch'); + * // mm.every(list, patterns[, options]); + * + * console.log(mm.every('foo.js', ['foo.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js'])); + * // true + * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js'])); + * // false + * console.log(mm.every(['foo.js'], ['*.js', '!foo.js'])); + * // false + * ``` + * @param {String|Array} `list` The string or array of strings to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list` + * @api public + */ + +micromatch.every = (list, patterns, options) => { + let items = [].concat(list); + + for (let pattern of [].concat(patterns)) { + let isMatch = picomatch(String(pattern), options); + if (!items.every(item => isMatch(item))) { + return false; + } + } + return true; +}; + +/** + * Returns true if **all** of the given `patterns` match + * the specified string. + * + * ```js + * const mm = require('micromatch'); + * // mm.all(string, patterns[, options]); + * + * console.log(mm.all('foo.js', ['foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', '!foo.js'])); + * // false + * + * console.log(mm.all('foo.js', ['*.js', 'foo.js'])); + * // true + * + * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js'])); + * // true + * ``` + * @param {String|Array} `str` The string to test. + * @param {String|Array} `patterns` One or more glob patterns to use for matching. + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +micromatch.all = (str, patterns, options) => { + if (typeof str !== 'string') { + throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + } + + return [].concat(patterns).every(p => picomatch(p, options)(str)); +}; + +/** + * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match. + * + * ```js + * const mm = require('micromatch'); + * // mm.capture(pattern, string[, options]); + * + * console.log(mm.capture('test/*.js', 'test/foo.js')); + * //=> ['foo'] + * console.log(mm.capture('test/*.js', 'foo/bar.css')); + * //=> null + * ``` + * @param {String} `glob` Glob pattern to use for matching. + * @param {String} `input` String to match + * @param {Object} `options` See available [options](#options) for changing how matches are performed + * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`. + * @api public + */ + +micromatch.capture = (glob, input, options) => { + let posix = utils.isWindows(options); + let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); + let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); + + if (match) { + return match.slice(1).map(v => v === void 0 ? '' : v); + } +}; + +/** + * Create a regular expression from the given glob `pattern`. + * + * ```js + * const mm = require('micromatch'); + * // mm.makeRe(pattern[, options]); + * + * console.log(mm.makeRe('*.js')); + * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/ + * ``` + * @param {String} `pattern` A glob pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +micromatch.makeRe = (...args) => picomatch.makeRe(...args); + +/** + * Scan a glob pattern to separate the pattern into segments. Used + * by the [split](#split) method. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.scan(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +micromatch.scan = (...args) => picomatch.scan(...args); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const mm = require('micromatch'); + * const state = mm.parse(pattern[, options]); + * ``` + * @param {String} `glob` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as regex source string. + * @api public + */ + +micromatch.parse = (patterns, options) => { + let res = []; + for (let pattern of [].concat(patterns || [])) { + for (let str of braces(String(pattern), options)) { + res.push(picomatch.parse(str, options)); + } + } + return res; +}; + +/** + * Process the given brace `pattern`. + * + * ```js + * const { braces } = require('micromatch'); + * console.log(braces('foo/{a,b,c}/bar')); + * //=> [ 'foo/(a|b|c)/bar' ] + * + * console.log(braces('foo/{a,b,c}/bar', { expand: true })); + * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ] + * ``` + * @param {String} `pattern` String with brace pattern to process. + * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options. + * @return {Array} + * @api public + */ + +micromatch.braces = (pattern, options) => { + if (typeof pattern !== 'string') throw new TypeError('Expected a string'); + if ((options && options.nobrace === true) || !hasBraces(pattern)) { + return [pattern]; + } + return braces(pattern, options); +}; + +/** + * Expand braces + */ + +micromatch.braceExpand = (pattern, options) => { + if (typeof pattern !== 'string') throw new TypeError('Expected a string'); + return micromatch.braces(pattern, { ...options, expand: true }); +}; + +/** + * Expose micromatch + */ + +// exposed for tests +micromatch.hasBraces = hasBraces; +module.exports = micromatch; /***/ }), -/***/ 9072: -/***/ ((module) => { - -"use strict"; - - -class CancelError extends Error { - constructor(reason) { - super(reason || 'Promise was canceled'); - this.name = 'CancelError'; - } - - get isCanceled() { - return true; - } -} - -class PCancelable { - static fn(userFn) { - return (...arguments_) => { - return new PCancelable((resolve, reject, onCancel) => { - arguments_.push(onCancel); - // eslint-disable-next-line promise/prefer-await-to-then - userFn(...arguments_).then(resolve, reject); - }); - }; - } - - constructor(executor) { - this._cancelHandlers = []; - this._isPending = true; - this._isCanceled = false; - this._rejectOnCancel = true; - - this._promise = new Promise((resolve, reject) => { - this._reject = reject; - - const onResolve = value => { - this._isPending = false; - resolve(value); - }; - - const onReject = error => { - this._isPending = false; - reject(error); - }; - - const onCancel = handler => { - if (!this._isPending) { - throw new Error('The `onCancel` handler was attached after the promise settled.'); - } - - this._cancelHandlers.push(handler); - }; - - Object.defineProperties(onCancel, { - shouldReject: { - get: () => this._rejectOnCancel, - set: boolean => { - this._rejectOnCancel = boolean; - } - } - }); - - return executor(onResolve, onReject, onCancel); - }); - } - - then(onFulfilled, onRejected) { - // eslint-disable-next-line promise/prefer-await-to-then - return this._promise.then(onFulfilled, onRejected); - } - - catch(onRejected) { - return this._promise.catch(onRejected); - } - - finally(onFinally) { - return this._promise.finally(onFinally); - } - - cancel(reason) { - if (!this._isPending || this._isCanceled) { - return; - } - - if (this._cancelHandlers.length > 0) { - try { - for (const handler of this._cancelHandlers) { - handler(); - } - } catch (error) { - this._reject(error); - } - } - - this._isCanceled = true; - if (this._rejectOnCancel) { - this._reject(new CancelError(reason)); - } - } - - get isCanceled() { - return this._isCanceled; - } -} - -Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); - -module.exports = PCancelable; -module.exports.CancelError = CancelError; - - -/***/ }), - -/***/ 8569: +/***/ 6377: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -module.exports = __nccwpck_require__(3322); +module.exports = __nccwpck_require__(9639); /***/ }), -/***/ 6099: +/***/ 9560: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const path = __nccwpck_require__(5622); +const path = __nccwpck_require__(6928); const WIN_SLASH = '\\\\/'; const WIN_NO_SLASH = `[^${WIN_SLASH}]`; @@ -23259,14 +25405,14 @@ module.exports = { /***/ }), -/***/ 2139: +/***/ 7430: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const constants = __nccwpck_require__(6099); -const utils = __nccwpck_require__(479); +const constants = __nccwpck_require__(9560); +const utils = __nccwpck_require__(8604); /** * Constants @@ -23357,7 +25503,7 @@ const parse = (input, options) => { START_ANCHOR } = PLATFORM_CHARS; - const globstar = (opts) => { + const globstar = opts => { return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }; @@ -23407,12 +25553,13 @@ const parse = (input, options) => { const eos = () => state.index === len - 1; const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index]; + const advance = state.advance = () => input[++state.index] || ''; const remaining = () => input.slice(state.index + 1); const consume = (value = '', num = 0) => { state.consumed += value; state.index += num; }; + const append = token => { state.output += token.output != null ? token.output : token.value; consume(token.value); @@ -23468,7 +25615,7 @@ const parse = (input, options) => { } } - if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) { + if (extglobs.length && tok.type !== 'paren') { extglobs[extglobs.length - 1].inner += tok.value; } @@ -23500,6 +25647,7 @@ const parse = (input, options) => { const extglobClose = token => { let output = token.close + (opts.capture ? ')' : ''); + let rest; if (token.type === 'negate') { let extglobStar = star; @@ -23512,7 +25660,18 @@ const parse = (input, options) => { output = token.close = `)$))${extglobStar}`; } - if (token.prev.type === 'bos' && eos()) { + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { state.negatedExtglob = true; } } @@ -23621,9 +25780,9 @@ const parse = (input, options) => { } if (opts.unescape === true) { - value = advance() || ''; + value = advance(); } else { - value += advance() || ''; + value += advance(); } if (state.brackets === 0) { @@ -24287,7 +26446,7 @@ parse.fastpaths = (input, options) => { star = `(${star})`; } - const globstar = (opts) => { + const globstar = opts => { if (opts.noglobstar === true) return star; return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }; @@ -24345,17 +26504,17 @@ module.exports = parse; /***/ }), -/***/ 3322: +/***/ 9639: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const path = __nccwpck_require__(5622); -const scan = __nccwpck_require__(2429); -const parse = __nccwpck_require__(2139); -const utils = __nccwpck_require__(479); -const constants = __nccwpck_require__(6099); +const path = __nccwpck_require__(6928); +const scan = __nccwpck_require__(6028); +const parse = __nccwpck_require__(7430); +const utils = __nccwpck_require__(8604); +const constants = __nccwpck_require__(9560); const isObject = val => val && typeof val === 'object' && !Array.isArray(val); /** @@ -24581,6 +26740,40 @@ picomatch.parse = (pattern, options) => { picomatch.scan = (input, options) => scan(input, options); +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + /** * Create a regular expression from a parsed glob pattern. * @@ -24594,56 +26787,25 @@ picomatch.scan = (input, options) => scan(input, options); * ``` * @param {String} `state` The object returned from the `.parse` method. * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. * @return {RegExp} Returns a regex created from the given pattern. * @api public */ -picomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return parsed.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${parsed.output})${append}`; - if (parsed && parsed.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = parsed; - } - - return regex; -}; - -picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => { +picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { if (!input || typeof input !== 'string') { throw new TypeError('Expected a non-empty string'); } - const opts = options || {}; let parsed = { negated: false, fastpaths: true }; - let prefix = ''; - let output; - if (input.startsWith('./')) { - input = input.slice(2); - prefix = parsed.prefix = './'; + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse.fastpaths(input, options); } - if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - output = parse.fastpaths(input, options); - } - - if (output === undefined) { + if (!parsed.output) { parsed = parse(input, options); - parsed.prefix = prefix + (parsed.prefix || ''); - } else { - parsed.output = output; } return picomatch.compileRe(parsed, options, returnOutput, returnState); @@ -24692,13 +26854,13 @@ module.exports = picomatch; /***/ }), -/***/ 2429: +/***/ 6028: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const utils = __nccwpck_require__(479); +const utils = __nccwpck_require__(8604); const { CHAR_ASTERISK, /* * */ CHAR_AT, /* @ */ @@ -24715,7 +26877,7 @@ const { CHAR_RIGHT_CURLY_BRACE, /* } */ CHAR_RIGHT_PARENTHESES, /* ) */ CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = __nccwpck_require__(6099); +} = __nccwpck_require__(9560); const isPathSeparator = code => { return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; @@ -24730,7 +26892,8 @@ const depth = token => { /** * Quickly scans a glob pattern and returns an object with a handful of * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), and `negated` (true if the path starts with `!`). + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). * * ```js * const pm = require('picomatch'); @@ -24764,6 +26927,7 @@ const scan = (input, options) => { let braceEscaped = false; let backslashes = false; let negated = false; + let negatedExtglob = false; let finished = false; let braces = 0; let prev; @@ -24875,6 +27039,9 @@ const scan = (input, options) => { isGlob = token.isGlob = true; isExtglob = token.isExtglob = true; finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } if (scanToEnd === true) { while (eos() !== true && (code = advance())) { @@ -24929,13 +27096,15 @@ const scan = (input, options) => { isBracket = token.isBracket = true; isGlob = token.isGlob = true; finished = true; - - if (scanToEnd === true) { - continue; - } break; } } + + if (scanToEnd === true) { + continue; + } + + break; } if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { @@ -25026,7 +27195,8 @@ const scan = (input, options) => { isGlob, isExtglob, isGlobstar, - negated + negated, + negatedExtglob }; if (opts.tokens === true) { @@ -25083,20 +27253,20 @@ module.exports = scan; /***/ }), -/***/ 479: +/***/ 8604: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -const path = __nccwpck_require__(5622); +const path = __nccwpck_require__(6928); const win32 = process.platform === 'win32'; const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL -} = __nccwpck_require__(6099); +} = __nccwpck_require__(9560); exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); @@ -25155,12 +27325,2578 @@ exports.wrapOutput = (input, state = {}, options = {}) => { /***/ }), -/***/ 8341: +/***/ 9991: +/***/ ((module) => { + +"use strict"; + + +// We define these manually to ensure they're always copied +// even if they would move up the prototype chain +// https://nodejs.org/api/http.html#http_class_http_incomingmessage +const knownProps = [ + 'destroy', + 'setTimeout', + 'socket', + 'headers', + 'trailers', + 'rawHeaders', + 'statusCode', + 'httpVersion', + 'httpVersionMinor', + 'httpVersionMajor', + 'rawTrailers', + 'statusMessage' +]; + +module.exports = (fromStream, toStream) => { + const fromProps = new Set(Object.keys(fromStream).concat(knownProps)); + + for (const prop of fromProps) { + // Don't overwrite existing properties + if (prop in toStream) { + continue; + } + + toStream[prop] = typeof fromStream[prop] === 'function' ? fromStream[prop].bind(fromStream) : fromStream[prop]; + } +}; + + +/***/ }), + +/***/ 7827: +/***/ ((module) => { + +"use strict"; + + +// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs +const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain'; +const DATA_URL_DEFAULT_CHARSET = 'us-ascii'; + +const testParameter = (name, filters) => { + return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); +}; + +const normalizeDataURL = (urlString, {stripHash}) => { + const match = /^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(urlString); + + if (!match) { + throw new Error(`Invalid URL: ${urlString}`); + } + + let {type, data, hash} = match.groups; + const mediaType = type.split(';'); + hash = stripHash ? '' : hash; + + let isBase64 = false; + if (mediaType[mediaType.length - 1] === 'base64') { + mediaType.pop(); + isBase64 = true; + } + + // Lowercase MIME type + const mimeType = (mediaType.shift() || '').toLowerCase(); + const attributes = mediaType + .map(attribute => { + let [key, value = ''] = attribute.split('=').map(string => string.trim()); + + // Lowercase `charset` + if (key === 'charset') { + value = value.toLowerCase(); + + if (value === DATA_URL_DEFAULT_CHARSET) { + return ''; + } + } + + return `${key}${value ? `=${value}` : ''}`; + }) + .filter(Boolean); + + const normalizedMediaType = [ + ...attributes + ]; + + if (isBase64) { + normalizedMediaType.push('base64'); + } + + if (normalizedMediaType.length !== 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) { + normalizedMediaType.unshift(mimeType); + } + + return `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hash ? `#${hash}` : ''}`; +}; + +const normalizeUrl = (urlString, options) => { + options = { + defaultProtocol: 'http:', + normalizeProtocol: true, + forceHttp: false, + forceHttps: false, + stripAuthentication: true, + stripHash: false, + stripTextFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeSingleSlash: true, + removeDirectoryIndex: false, + sortQueryParameters: true, + ...options + }; + + urlString = urlString.trim(); + + // Data URL + if (/^data:/i.test(urlString)) { + return normalizeDataURL(urlString, options); + } + + if (/^view-source:/i.test(urlString)) { + throw new Error('`view-source:` is not supported as it is a non-standard protocol'); + } + + const hasRelativeProtocol = urlString.startsWith('//'); + const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString); + + // Prepend protocol + if (!isRelativeUrl) { + urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, options.defaultProtocol); + } + + const urlObj = new URL(urlString); + + if (options.forceHttp && options.forceHttps) { + throw new Error('The `forceHttp` and `forceHttps` options cannot be used together'); + } + + if (options.forceHttp && urlObj.protocol === 'https:') { + urlObj.protocol = 'http:'; + } + + if (options.forceHttps && urlObj.protocol === 'http:') { + urlObj.protocol = 'https:'; + } + + // Remove auth + if (options.stripAuthentication) { + urlObj.username = ''; + urlObj.password = ''; + } + + // Remove hash + if (options.stripHash) { + urlObj.hash = ''; + } else if (options.stripTextFragment) { + urlObj.hash = urlObj.hash.replace(/#?:~:text.*?$/i, ''); + } + + // Remove duplicate slashes if not preceded by a protocol + if (urlObj.pathname) { + urlObj.pathname = urlObj.pathname.replace(/(? 0) { + let pathComponents = urlObj.pathname.split('/'); + const lastComponent = pathComponents[pathComponents.length - 1]; + + if (testParameter(lastComponent, options.removeDirectoryIndex)) { + pathComponents = pathComponents.slice(0, pathComponents.length - 1); + urlObj.pathname = pathComponents.slice(1).join('/') + '/'; + } + } + + if (urlObj.hostname) { + // Remove trailing dot + urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); + + // Remove `www.` + if (options.stripWWW && /^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(urlObj.hostname)) { + // Each label should be max 63 at length (min: 1). + // Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names + // Each TLD should be up to 63 characters long (min: 2). + // It is technically possible to have a single character TLD, but none currently exist. + urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); + } + } + + // Remove query unwanted parameters + if (Array.isArray(options.removeQueryParameters)) { + for (const key of [...urlObj.searchParams.keys()]) { + if (testParameter(key, options.removeQueryParameters)) { + urlObj.searchParams.delete(key); + } + } + } + + if (options.removeQueryParameters === true) { + urlObj.search = ''; + } + + // Sort query parameters + if (options.sortQueryParameters) { + urlObj.searchParams.sort(); + } + + if (options.removeTrailingSlash) { + urlObj.pathname = urlObj.pathname.replace(/\/$/, ''); + } + + const oldUrlString = urlString; + + // Take advantage of many of the Node `url` normalizations + urlString = urlObj.toString(); + + if (!options.removeSingleSlash && urlObj.pathname === '/' && !oldUrlString.endsWith('/') && urlObj.hash === '') { + urlString = urlString.replace(/\/$/, ''); + } + + // Remove ending `/` unless removeSingleSlash is false + if ((options.removeTrailingSlash || urlObj.pathname === '/') && urlObj.hash === '' && options.removeSingleSlash) { + urlString = urlString.replace(/\/$/, ''); + } + + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !options.normalizeProtocol) { + urlString = urlString.replace(/^http:\/\//, '//'); + } + + // Remove http/https + if (options.stripProtocol) { + urlString = urlString.replace(/^(?:https?:)?\/\//, ''); + } + + return urlString; +}; + +module.exports = normalizeUrl; + + +/***/ }), + +/***/ 5560: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var once = __nccwpck_require__(1223) -var eos = __nccwpck_require__(1205) -var fs = __nccwpck_require__(5747) // we only need fs to get the ReadStream and WriteStream prototypes +var wrappy = __nccwpck_require__(8264) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), + +/***/ 4533: +/***/ ((module) => { + +"use strict"; + + +class CancelError extends Error { + constructor(reason) { + super(reason || 'Promise was canceled'); + this.name = 'CancelError'; + } + + get isCanceled() { + return true; + } +} + +class PCancelable { + static fn(userFn) { + return (...arguments_) => { + return new PCancelable((resolve, reject, onCancel) => { + arguments_.push(onCancel); + // eslint-disable-next-line promise/prefer-await-to-then + userFn(...arguments_).then(resolve, reject); + }); + }; + } + + constructor(executor) { + this._cancelHandlers = []; + this._isPending = true; + this._isCanceled = false; + this._rejectOnCancel = true; + + this._promise = new Promise((resolve, reject) => { + this._reject = reject; + + const onResolve = value => { + if (!this._isCanceled || !onCancel.shouldReject) { + this._isPending = false; + resolve(value); + } + }; + + const onReject = error => { + this._isPending = false; + reject(error); + }; + + const onCancel = handler => { + if (!this._isPending) { + throw new Error('The `onCancel` handler was attached after the promise settled.'); + } + + this._cancelHandlers.push(handler); + }; + + Object.defineProperties(onCancel, { + shouldReject: { + get: () => this._rejectOnCancel, + set: boolean => { + this._rejectOnCancel = boolean; + } + } + }); + + return executor(onResolve, onReject, onCancel); + }); + } + + then(onFulfilled, onRejected) { + // eslint-disable-next-line promise/prefer-await-to-then + return this._promise.then(onFulfilled, onRejected); + } + + catch(onRejected) { + return this._promise.catch(onRejected); + } + + finally(onFinally) { + return this._promise.finally(onFinally); + } + + cancel(reason) { + if (!this._isPending || this._isCanceled) { + return; + } + + this._isCanceled = true; + + if (this._cancelHandlers.length > 0) { + try { + for (const handler of this._cancelHandlers) { + handler(); + } + } catch (error) { + this._reject(error); + return; + } + } + + if (this._rejectOnCancel) { + this._reject(new CancelError(reason)); + } + } + + get isCanceled() { + return this._isCanceled; + } +} + +Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); + +module.exports = PCancelable; +module.exports.CancelError = CancelError; + + +/***/ }), + +/***/ 4006: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const pico = __nccwpck_require__(8016); +const utils = __nccwpck_require__(4059); + +function picomatch(glob, options, returnState = false) { + // default to os.platform() + if (options && (options.windows === null || options.windows === undefined)) { + // don't mutate the original options object + options = { ...options, windows: utils.isWindows() }; + } + + return pico(glob, options, returnState); +} + +Object.assign(picomatch, pico); +module.exports = picomatch; + + +/***/ }), + +/***/ 5595: +/***/ ((module) => { + +"use strict"; + + +const WIN_SLASH = '\\\\/'; +const WIN_NO_SLASH = `[^${WIN_SLASH}]`; + +/** + * Posix glob regex + */ + +const DOT_LITERAL = '\\.'; +const PLUS_LITERAL = '\\+'; +const QMARK_LITERAL = '\\?'; +const SLASH_LITERAL = '\\/'; +const ONE_CHAR = '(?=.)'; +const QMARK = '[^/]'; +const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; +const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; +const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; +const NO_DOT = `(?!${DOT_LITERAL})`; +const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; +const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; +const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; +const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; +const STAR = `${QMARK}*?`; +const SEP = '/'; + +const POSIX_CHARS = { + DOT_LITERAL, + PLUS_LITERAL, + QMARK_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + QMARK, + END_ANCHOR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK_NO_DOT, + STAR, + START_ANCHOR, + SEP +}; + +/** + * Windows glob regex + */ + +const WINDOWS_CHARS = { + ...POSIX_CHARS, + + SLASH_LITERAL: `[${WIN_SLASH}]`, + QMARK: WIN_NO_SLASH, + STAR: `${WIN_NO_SLASH}*?`, + DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, + NO_DOT: `(?!${DOT_LITERAL})`, + NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, + NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, + QMARK_NO_DOT: `[^.${WIN_SLASH}]`, + START_ANCHOR: `(?:^|[${WIN_SLASH}])`, + END_ANCHOR: `(?:[${WIN_SLASH}]|$)`, + SEP: '\\' +}; + +/** + * POSIX Bracket Regex + */ + +const POSIX_REGEX_SOURCE = { + alnum: 'a-zA-Z0-9', + alpha: 'a-zA-Z', + ascii: '\\x00-\\x7F', + blank: ' \\t', + cntrl: '\\x00-\\x1F\\x7F', + digit: '0-9', + graph: '\\x21-\\x7E', + lower: 'a-z', + print: '\\x20-\\x7E ', + punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', + space: ' \\t\\r\\n\\v\\f', + upper: 'A-Z', + word: 'A-Za-z0-9_', + xdigit: 'A-Fa-f0-9' +}; + +module.exports = { + MAX_LENGTH: 1024 * 64, + POSIX_REGEX_SOURCE, + + // regular expressions + REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, + REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, + REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, + REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, + REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, + REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, + + // Replace globs with equivalent patterns to reduce parsing time. + REPLACEMENTS: { + __proto__: null, + '***': '*', + '**/**': '**', + '**/**/**': '**' + }, + + // Digits + CHAR_0: 48, /* 0 */ + CHAR_9: 57, /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 65, /* A */ + CHAR_LOWERCASE_A: 97, /* a */ + CHAR_UPPERCASE_Z: 90, /* Z */ + CHAR_LOWERCASE_Z: 122, /* z */ + + CHAR_LEFT_PARENTHESES: 40, /* ( */ + CHAR_RIGHT_PARENTHESES: 41, /* ) */ + + CHAR_ASTERISK: 42, /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: 38, /* & */ + CHAR_AT: 64, /* @ */ + CHAR_BACKWARD_SLASH: 92, /* \ */ + CHAR_CARRIAGE_RETURN: 13, /* \r */ + CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ + CHAR_COLON: 58, /* : */ + CHAR_COMMA: 44, /* , */ + CHAR_DOT: 46, /* . */ + CHAR_DOUBLE_QUOTE: 34, /* " */ + CHAR_EQUAL: 61, /* = */ + CHAR_EXCLAMATION_MARK: 33, /* ! */ + CHAR_FORM_FEED: 12, /* \f */ + CHAR_FORWARD_SLASH: 47, /* / */ + CHAR_GRAVE_ACCENT: 96, /* ` */ + CHAR_HASH: 35, /* # */ + CHAR_HYPHEN_MINUS: 45, /* - */ + CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ + CHAR_LEFT_CURLY_BRACE: 123, /* { */ + CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ + CHAR_LINE_FEED: 10, /* \n */ + CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ + CHAR_PERCENT: 37, /* % */ + CHAR_PLUS: 43, /* + */ + CHAR_QUESTION_MARK: 63, /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ + CHAR_RIGHT_CURLY_BRACE: 125, /* } */ + CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ + CHAR_SEMICOLON: 59, /* ; */ + CHAR_SINGLE_QUOTE: 39, /* ' */ + CHAR_SPACE: 32, /* */ + CHAR_TAB: 9, /* \t */ + CHAR_UNDERSCORE: 95, /* _ */ + CHAR_VERTICAL_LINE: 124, /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ + + /** + * Create EXTGLOB_CHARS + */ + + extglobChars(chars) { + return { + '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, + '?': { type: 'qmark', open: '(?:', close: ')?' }, + '+': { type: 'plus', open: '(?:', close: ')+' }, + '*': { type: 'star', open: '(?:', close: ')*' }, + '@': { type: 'at', open: '(?:', close: ')' } + }; + }, + + /** + * Create GLOB_CHARS + */ + + globChars(win32) { + return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; + } +}; + + +/***/ }), + +/***/ 8265: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const constants = __nccwpck_require__(5595); +const utils = __nccwpck_require__(4059); + +/** + * Constants + */ + +const { + MAX_LENGTH, + POSIX_REGEX_SOURCE, + REGEX_NON_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_BACKREF, + REPLACEMENTS +} = constants; + +/** + * Helpers + */ + +const expandRange = (args, options) => { + if (typeof options.expandRange === 'function') { + return options.expandRange(...args, options); + } + + args.sort(); + const value = `[${args.join('-')}]`; + + try { + /* eslint-disable-next-line no-new */ + new RegExp(value); + } catch (ex) { + return args.map(v => utils.escapeRegex(v)).join('..'); + } + + return value; +}; + +/** + * Create the message for a syntax error + */ + +const syntaxError = (type, char) => { + return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; +}; + +/** + * Parse the given input string. + * @param {String} input + * @param {Object} options + * @return {Object} + */ + +const parse = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + input = REPLACEMENTS[input] || input; + + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + + let len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + const bos = { type: 'bos', value: '', output: opts.prepend || '' }; + const tokens = [bos]; + + const capture = opts.capture ? '' : '?:'; + + // create constants based on platform, for windows or posix + const PLATFORM_CHARS = constants.globChars(opts.windows); + const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); + + const { + DOT_LITERAL, + PLUS_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOT_SLASH, + NO_DOTS_SLASH, + QMARK, + QMARK_NO_DOT, + STAR, + START_ANCHOR + } = PLATFORM_CHARS; + + const globstar = opts => { + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const nodot = opts.dot ? '' : NO_DOT; + const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; + let star = opts.bash === true ? globstar(opts) : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + // minimatch options support + if (typeof opts.noext === 'boolean') { + opts.noextglob = opts.noext; + } + + const state = { + input, + index: -1, + start: 0, + dot: opts.dot === true, + consumed: '', + output: '', + prefix: '', + backtrack: false, + negated: false, + brackets: 0, + braces: 0, + parens: 0, + quotes: 0, + globstar: false, + tokens + }; + + input = utils.removePrefix(input, state); + len = input.length; + + const extglobs = []; + const braces = []; + const stack = []; + let prev = bos; + let value; + + /** + * Tokenizing helpers + */ + + const eos = () => state.index === len - 1; + const peek = state.peek = (n = 1) => input[state.index + n]; + const advance = state.advance = () => input[++state.index] || ''; + const remaining = () => input.slice(state.index + 1); + const consume = (value = '', num = 0) => { + state.consumed += value; + state.index += num; + }; + + const append = token => { + state.output += token.output != null ? token.output : token.value; + consume(token.value); + }; + + const negate = () => { + let count = 1; + + while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { + advance(); + state.start++; + count++; + } + + if (count % 2 === 0) { + return false; + } + + state.negated = true; + state.start++; + return true; + }; + + const increment = type => { + state[type]++; + stack.push(type); + }; + + const decrement = type => { + state[type]--; + stack.pop(); + }; + + /** + * Push tokens onto the tokens array. This helper speeds up + * tokenizing by 1) helping us avoid backtracking as much as possible, + * and 2) helping us avoid creating extra tokens when consecutive + * characters are plain text. This improves performance and simplifies + * lookbehinds. + */ + + const push = tok => { + if (prev.type === 'globstar') { + const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); + const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); + + if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { + state.output = state.output.slice(0, -prev.output.length); + prev.type = 'star'; + prev.value = '*'; + prev.output = star; + state.output += prev.output; + } + } + + if (extglobs.length && tok.type !== 'paren') { + extglobs[extglobs.length - 1].inner += tok.value; + } + + if (tok.value || tok.output) append(tok); + if (prev && prev.type === 'text' && tok.type === 'text') { + prev.output = (prev.output || prev.value) + tok.value; + prev.value += tok.value; + return; + } + + tok.prev = prev; + tokens.push(tok); + prev = tok; + }; + + const extglobOpen = (type, value) => { + const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; + + token.prev = prev; + token.parens = state.parens; + token.output = state.output; + const output = (opts.capture ? '(' : '') + token.open; + + increment('parens'); + push({ type, value, output: state.output ? '' : ONE_CHAR }); + push({ type: 'paren', extglob: true, value: advance(), output }); + extglobs.push(token); + }; + + const extglobClose = token => { + let output = token.close + (opts.capture ? ')' : ''); + let rest; + + if (token.type === 'negate') { + let extglobStar = star; + + if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { + extglobStar = globstar(opts); + } + + if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { + output = token.close = `)$))${extglobStar}`; + } + + if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. + // In this case, we need to parse the string and use it in the output of the original pattern. + // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. + // + // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. + const expression = parse(rest, { ...options, fastpaths: false }).output; + + output = token.close = `)${expression})${extglobStar})`; + } + + if (token.prev.type === 'bos') { + state.negatedExtglob = true; + } + } + + push({ type: 'paren', extglob: true, value, output }); + decrement('parens'); + }; + + /** + * Fast paths + */ + + if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { + let backslashes = false; + + let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { + if (first === '\\') { + backslashes = true; + return m; + } + + if (first === '?') { + if (esc) { + return esc + first + (rest ? QMARK.repeat(rest.length) : ''); + } + if (index === 0) { + return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); + } + return QMARK.repeat(chars.length); + } + + if (first === '.') { + return DOT_LITERAL.repeat(chars.length); + } + + if (first === '*') { + if (esc) { + return esc + first + (rest ? star : ''); + } + return star; + } + return esc ? m : `\\${m}`; + }); + + if (backslashes === true) { + if (opts.unescape === true) { + output = output.replace(/\\/g, ''); + } else { + output = output.replace(/\\+/g, m => { + return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); + }); + } + } + + if (output === input && opts.contains === true) { + state.output = input; + return state; + } + + state.output = utils.wrapOutput(output, state, options); + return state; + } + + /** + * Tokenize input until we reach end-of-string + */ + + while (!eos()) { + value = advance(); + + if (value === '\u0000') { + continue; + } + + /** + * Escaped characters + */ + + if (value === '\\') { + const next = peek(); + + if (next === '/' && opts.bash !== true) { + continue; + } + + if (next === '.' || next === ';') { + continue; + } + + if (!next) { + value += '\\'; + push({ type: 'text', value }); + continue; + } + + // collapse slashes to reduce potential for exploits + const match = /^\\+/.exec(remaining()); + let slashes = 0; + + if (match && match[0].length > 2) { + slashes = match[0].length; + state.index += slashes; + if (slashes % 2 !== 0) { + value += '\\'; + } + } + + if (opts.unescape === true) { + value = advance(); + } else { + value += advance(); + } + + if (state.brackets === 0) { + push({ type: 'text', value }); + continue; + } + } + + /** + * If we're inside a regex character class, continue + * until we reach the closing bracket. + */ + + if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { + if (opts.posix !== false && value === ':') { + const inner = prev.value.slice(1); + if (inner.includes('[')) { + prev.posix = true; + + if (inner.includes(':')) { + const idx = prev.value.lastIndexOf('['); + const pre = prev.value.slice(0, idx); + const rest = prev.value.slice(idx + 2); + const posix = POSIX_REGEX_SOURCE[rest]; + if (posix) { + prev.value = pre + posix; + state.backtrack = true; + advance(); + + if (!bos.output && tokens.indexOf(prev) === 1) { + bos.output = ONE_CHAR; + } + continue; + } + } + } + } + + if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { + value = `\\${value}`; + } + + if (value === ']' && (prev.value === '[' || prev.value === '[^')) { + value = `\\${value}`; + } + + if (opts.posix === true && value === '!' && prev.value === '[') { + value = '^'; + } + + prev.value += value; + append({ value }); + continue; + } + + /** + * If we're inside a quoted string, continue + * until we reach the closing double quote. + */ + + if (state.quotes === 1 && value !== '"') { + value = utils.escapeRegex(value); + prev.value += value; + append({ value }); + continue; + } + + /** + * Double quotes + */ + + if (value === '"') { + state.quotes = state.quotes === 1 ? 0 : 1; + if (opts.keepQuotes === true) { + push({ type: 'text', value }); + } + continue; + } + + /** + * Parentheses + */ + + if (value === '(') { + increment('parens'); + push({ type: 'paren', value }); + continue; + } + + if (value === ')') { + if (state.parens === 0 && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '(')); + } + + const extglob = extglobs[extglobs.length - 1]; + if (extglob && state.parens === extglob.parens + 1) { + extglobClose(extglobs.pop()); + continue; + } + + push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); + decrement('parens'); + continue; + } + + /** + * Square brackets + */ + + if (value === '[') { + if (opts.nobracket === true || !remaining().includes(']')) { + if (opts.nobracket !== true && opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('closing', ']')); + } + + value = `\\${value}`; + } else { + increment('brackets'); + } + + push({ type: 'bracket', value }); + continue; + } + + if (value === ']') { + if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + if (state.brackets === 0) { + if (opts.strictBrackets === true) { + throw new SyntaxError(syntaxError('opening', '[')); + } + + push({ type: 'text', value, output: `\\${value}` }); + continue; + } + + decrement('brackets'); + + const prevValue = prev.value.slice(1); + if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { + value = `/${value}`; + } + + prev.value += value; + append({ value }); + + // when literal brackets are explicitly disabled + // assume we should match with a regex character class + if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { + continue; + } + + const escaped = utils.escapeRegex(prev.value); + state.output = state.output.slice(0, -prev.value.length); + + // when literal brackets are explicitly enabled + // assume we should escape the brackets to match literal characters + if (opts.literalBrackets === true) { + state.output += escaped; + prev.value = escaped; + continue; + } + + // when the user specifies nothing, try to match both + prev.value = `(${capture}${escaped}|${prev.value})`; + state.output += prev.value; + continue; + } + + /** + * Braces + */ + + if (value === '{' && opts.nobrace !== true) { + increment('braces'); + + const open = { + type: 'brace', + value, + output: '(', + outputIndex: state.output.length, + tokensIndex: state.tokens.length + }; + + braces.push(open); + push(open); + continue; + } + + if (value === '}') { + const brace = braces[braces.length - 1]; + + if (opts.nobrace === true || !brace) { + push({ type: 'text', value, output: value }); + continue; + } + + let output = ')'; + + if (brace.dots === true) { + const arr = tokens.slice(); + const range = []; + + for (let i = arr.length - 1; i >= 0; i--) { + tokens.pop(); + if (arr[i].type === 'brace') { + break; + } + if (arr[i].type !== 'dots') { + range.unshift(arr[i].value); + } + } + + output = expandRange(range, opts); + state.backtrack = true; + } + + if (brace.comma !== true && brace.dots !== true) { + const out = state.output.slice(0, brace.outputIndex); + const toks = state.tokens.slice(brace.tokensIndex); + brace.value = brace.output = '\\{'; + value = output = '\\}'; + state.output = out; + for (const t of toks) { + state.output += (t.output || t.value); + } + } + + push({ type: 'brace', value, output }); + decrement('braces'); + braces.pop(); + continue; + } + + /** + * Pipes + */ + + if (value === '|') { + if (extglobs.length > 0) { + extglobs[extglobs.length - 1].conditions++; + } + push({ type: 'text', value }); + continue; + } + + /** + * Commas + */ + + if (value === ',') { + let output = value; + + const brace = braces[braces.length - 1]; + if (brace && stack[stack.length - 1] === 'braces') { + brace.comma = true; + output = '|'; + } + + push({ type: 'comma', value, output }); + continue; + } + + /** + * Slashes + */ + + if (value === '/') { + // if the beginning of the glob is "./", advance the start + // to the current index, and don't add the "./" characters + // to the state. This greatly simplifies lookbehinds when + // checking for BOS characters like "!" and "." (not "./") + if (prev.type === 'dot' && state.index === state.start + 1) { + state.start = state.index + 1; + state.consumed = ''; + state.output = ''; + tokens.pop(); + prev = bos; // reset "prev" to the first token + continue; + } + + push({ type: 'slash', value, output: SLASH_LITERAL }); + continue; + } + + /** + * Dots + */ + + if (value === '.') { + if (state.braces > 0 && prev.type === 'dot') { + if (prev.value === '.') prev.output = DOT_LITERAL; + const brace = braces[braces.length - 1]; + prev.type = 'dots'; + prev.output += value; + prev.value += value; + brace.dots = true; + continue; + } + + if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { + push({ type: 'text', value, output: DOT_LITERAL }); + continue; + } + + push({ type: 'dot', value, output: DOT_LITERAL }); + continue; + } + + /** + * Question marks + */ + + if (value === '?') { + const isGroup = prev && prev.value === '('; + if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('qmark', value); + continue; + } + + if (prev && prev.type === 'paren') { + const next = peek(); + let output = value; + + if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { + output = `\\${value}`; + } + + push({ type: 'text', value, output }); + continue; + } + + if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { + push({ type: 'qmark', value, output: QMARK_NO_DOT }); + continue; + } + + push({ type: 'qmark', value, output: QMARK }); + continue; + } + + /** + * Exclamation + */ + + if (value === '!') { + if (opts.noextglob !== true && peek() === '(') { + if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { + extglobOpen('negate', value); + continue; + } + } + + if (opts.nonegate !== true && state.index === 0) { + negate(); + continue; + } + } + + /** + * Plus + */ + + if (value === '+') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + extglobOpen('plus', value); + continue; + } + + if ((prev && prev.value === '(') || opts.regex === false) { + push({ type: 'plus', value, output: PLUS_LITERAL }); + continue; + } + + if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { + push({ type: 'plus', value }); + continue; + } + + push({ type: 'plus', value: PLUS_LITERAL }); + continue; + } + + /** + * Plain text + */ + + if (value === '@') { + if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { + push({ type: 'at', extglob: true, value, output: '' }); + continue; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Plain text + */ + + if (value !== '*') { + if (value === '$' || value === '^') { + value = `\\${value}`; + } + + const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); + if (match) { + value += match[0]; + state.index += match[0].length; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Stars + */ + + if (prev && (prev.type === 'globstar' || prev.star === true)) { + prev.type = 'star'; + prev.star = true; + prev.value += value; + prev.output = star; + state.backtrack = true; + state.globstar = true; + consume(value); + continue; + } + + let rest = remaining(); + if (opts.noextglob !== true && /^\([^?]/.test(rest)) { + extglobOpen('star', value); + continue; + } + + if (prev.type === 'star') { + if (opts.noglobstar === true) { + consume(value); + continue; + } + + const prior = prev.prev; + const before = prior.prev; + const isStart = prior.type === 'slash' || prior.type === 'bos'; + const afterStar = before && (before.type === 'star' || before.type === 'globstar'); + + if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { + push({ type: 'star', value, output: '' }); + continue; + } + + const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); + const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); + if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { + push({ type: 'star', value, output: '' }); + continue; + } + + // strip consecutive `/**/` + while (rest.slice(0, 3) === '/**') { + const after = input[state.index + 4]; + if (after && after !== '/') { + break; + } + rest = rest.slice(3); + consume('/**', 3); + } + + if (prior.type === 'bos' && eos()) { + prev.type = 'globstar'; + prev.value += value; + prev.output = globstar(opts); + state.output = prev.output; + state.globstar = true; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); + prev.value += value; + state.globstar = true; + state.output += prior.output + prev.output; + consume(value); + continue; + } + + if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { + const end = rest[1] !== void 0 ? '|$' : ''; + + state.output = state.output.slice(0, -(prior.output + prev.output).length); + prior.output = `(?:${prior.output}`; + + prev.type = 'globstar'; + prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; + prev.value += value; + + state.output += prior.output + prev.output; + state.globstar = true; + + consume(value + advance()); + + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + if (prior.type === 'bos' && rest[0] === '/') { + prev.type = 'globstar'; + prev.value += value; + prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; + state.output = prev.output; + state.globstar = true; + consume(value + advance()); + push({ type: 'slash', value: '/', output: '' }); + continue; + } + + // remove single star from output + state.output = state.output.slice(0, -prev.output.length); + + // reset previous token to globstar + prev.type = 'globstar'; + prev.output = globstar(opts); + prev.value += value; + + // reset output with globstar + state.output += prev.output; + state.globstar = true; + consume(value); + continue; + } + + const token = { type: 'star', value, output: star }; + + if (opts.bash === true) { + token.output = '.*?'; + if (prev.type === 'bos' || prev.type === 'slash') { + token.output = nodot + token.output; + } + push(token); + continue; + } + + if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { + token.output = value; + push(token); + continue; + } + + if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { + if (prev.type === 'dot') { + state.output += NO_DOT_SLASH; + prev.output += NO_DOT_SLASH; + + } else if (opts.dot === true) { + state.output += NO_DOTS_SLASH; + prev.output += NO_DOTS_SLASH; + + } else { + state.output += nodot; + prev.output += nodot; + } + + if (peek() !== '*') { + state.output += ONE_CHAR; + prev.output += ONE_CHAR; + } + } + + push(token); + } + + while (state.brackets > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); + state.output = utils.escapeLast(state.output, '['); + decrement('brackets'); + } + + while (state.parens > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); + state.output = utils.escapeLast(state.output, '('); + decrement('parens'); + } + + while (state.braces > 0) { + if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); + state.output = utils.escapeLast(state.output, '{'); + decrement('braces'); + } + + if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { + push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); + } + + // rebuild the output if we had to backtrack at any point + if (state.backtrack === true) { + state.output = ''; + + for (const token of state.tokens) { + state.output += token.output != null ? token.output : token.value; + + if (token.suffix) { + state.output += token.suffix; + } + } + } + + return state; +}; + +/** + * Fast paths for creating regular expressions for common glob patterns. + * This can significantly speed up processing and has very little downside + * impact when none of the fast paths match. + */ + +parse.fastpaths = (input, options) => { + const opts = { ...options }; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + const len = input.length; + if (len > max) { + throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); + } + + input = REPLACEMENTS[input] || input; + + // create constants based on platform, for windows or posix + const { + DOT_LITERAL, + SLASH_LITERAL, + ONE_CHAR, + DOTS_SLASH, + NO_DOT, + NO_DOTS, + NO_DOTS_SLASH, + STAR, + START_ANCHOR + } = constants.globChars(opts.windows); + + const nodot = opts.dot ? NO_DOTS : NO_DOT; + const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; + const capture = opts.capture ? '' : '?:'; + const state = { negated: false, prefix: '' }; + let star = opts.bash === true ? '.*?' : STAR; + + if (opts.capture) { + star = `(${star})`; + } + + const globstar = opts => { + if (opts.noglobstar === true) return star; + return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; + }; + + const create = str => { + switch (str) { + case '*': + return `${nodot}${ONE_CHAR}${star}`; + + case '.*': + return `${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*.*': + return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '*/*': + return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; + + case '**': + return nodot + globstar(opts); + + case '**/*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; + + case '**/*.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; + + case '**/.*': + return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; + + default: { + const match = /^(.*?)\.(\w+)$/.exec(str); + if (!match) return; + + const source = create(match[1]); + if (!source) return; + + return source + DOT_LITERAL + match[2]; + } + } + }; + + const output = utils.removePrefix(input, state); + let source = create(output); + + if (source && opts.strictSlashes !== true) { + source += `${SLASH_LITERAL}?`; + } + + return source; +}; + +module.exports = parse; + + +/***/ }), + +/***/ 8016: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const scan = __nccwpck_require__(1781); +const parse = __nccwpck_require__(8265); +const utils = __nccwpck_require__(4059); +const constants = __nccwpck_require__(5595); +const isObject = val => val && typeof val === 'object' && !Array.isArray(val); + +/** + * Creates a matcher function from one or more glob patterns. The + * returned function takes a string to match as its first argument, + * and returns true if the string is a match. The returned matcher + * function also takes a boolean as the second argument that, when true, + * returns an object with additional information. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch(glob[, options]); + * + * const isMatch = picomatch('*.!(*a)'); + * console.log(isMatch('a.a')); //=> false + * console.log(isMatch('a.b')); //=> true + * ``` + * @name picomatch + * @param {String|Array} `globs` One or more glob patterns. + * @param {Object=} `options` + * @return {Function=} Returns a matcher function. + * @api public + */ + +const picomatch = (glob, options, returnState = false) => { + if (Array.isArray(glob)) { + const fns = glob.map(input => picomatch(input, options, returnState)); + const arrayMatcher = str => { + for (const isMatch of fns) { + const state = isMatch(str); + if (state) return state; + } + return false; + }; + return arrayMatcher; + } + + const isState = isObject(glob) && glob.tokens && glob.input; + + if (glob === '' || (typeof glob !== 'string' && !isState)) { + throw new TypeError('Expected pattern to be a non-empty string'); + } + + const opts = options || {}; + const posix = opts.windows; + const regex = isState + ? picomatch.compileRe(glob, options) + : picomatch.makeRe(glob, options, false, true); + + const state = regex.state; + delete regex.state; + + let isIgnored = () => false; + if (opts.ignore) { + const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; + isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); + } + + const matcher = (input, returnObject = false) => { + const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); + const result = { glob, state, regex, posix, input, output, match, isMatch }; + + if (typeof opts.onResult === 'function') { + opts.onResult(result); + } + + if (isMatch === false) { + result.isMatch = false; + return returnObject ? result : false; + } + + if (isIgnored(input)) { + if (typeof opts.onIgnore === 'function') { + opts.onIgnore(result); + } + result.isMatch = false; + return returnObject ? result : false; + } + + if (typeof opts.onMatch === 'function') { + opts.onMatch(result); + } + return returnObject ? result : true; + }; + + if (returnState) { + matcher.state = state; + } + + return matcher; +}; + +/** + * Test `input` with the given `regex`. This is used by the main + * `picomatch()` function to test the input string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.test(input, regex[, options]); + * + * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); + * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } + * ``` + * @param {String} `input` String to test. + * @param {RegExp} `regex` + * @return {Object} Returns an object with matching info. + * @api public + */ + +picomatch.test = (input, regex, options, { glob, posix } = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected input to be a string'); + } + + if (input === '') { + return { isMatch: false, output: '' }; + } + + const opts = options || {}; + const format = opts.format || (posix ? utils.toPosixSlashes : null); + let match = input === glob; + let output = (match && format) ? format(input) : input; + + if (match === false) { + output = format ? format(input) : input; + match = output === glob; + } + + if (match === false || opts.capture === true) { + if (opts.matchBase === true || opts.basename === true) { + match = picomatch.matchBase(input, regex, options, posix); + } else { + match = regex.exec(output); + } + } + + return { isMatch: Boolean(match), match, output }; +}; + +/** + * Match the basename of a filepath. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.matchBase(input, glob[, options]); + * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true + * ``` + * @param {String} `input` String to test. + * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). + * @return {Boolean} + * @api public + */ + +picomatch.matchBase = (input, glob, options) => { + const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); + return regex.test(utils.basename(input)); +}; + +/** + * Returns true if **any** of the given glob `patterns` match the specified `string`. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.isMatch(string, patterns[, options]); + * + * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true + * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false + * ``` + * @param {String|Array} str The string to test. + * @param {String|Array} patterns One or more glob patterns to use for matching. + * @param {Object} [options] See available [options](#options). + * @return {Boolean} Returns true if any patterns match `str` + * @api public + */ + +picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); + +/** + * Parse a glob pattern to create the source string for a regular + * expression. + * + * ```js + * const picomatch = require('picomatch'); + * const result = picomatch.parse(pattern[, options]); + * ``` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Object} Returns an object with useful properties and output to be used as a regex source string. + * @api public + */ + +picomatch.parse = (pattern, options) => { + if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); + return parse(pattern, { ...options, fastpaths: false }); +}; + +/** + * Scan a glob pattern to separate the pattern into segments. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.scan(input[, options]); + * + * const result = picomatch.scan('!./foo/*.js'); + * console.log(result); + * { prefix: '!./', + * input: '!./foo/*.js', + * start: 3, + * base: 'foo', + * glob: '*.js', + * isBrace: false, + * isBracket: false, + * isGlob: true, + * isExtglob: false, + * isGlobstar: false, + * negated: true } + * ``` + * @param {String} `input` Glob pattern to scan. + * @param {Object} `options` + * @return {Object} Returns an object with + * @api public + */ + +picomatch.scan = (input, options) => scan(input, options); + +/** + * Compile a regular expression from the `state` object returned by the + * [parse()](#parse) method. + * + * @param {Object} `state` + * @param {Object} `options` + * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. + * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. + * @return {RegExp} + * @api public + */ + +picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { + if (returnOutput === true) { + return state.output; + } + + const opts = options || {}; + const prepend = opts.contains ? '' : '^'; + const append = opts.contains ? '' : '$'; + + let source = `${prepend}(?:${state.output})${append}`; + if (state && state.negated === true) { + source = `^(?!${source}).*$`; + } + + const regex = picomatch.toRegex(source, options); + if (returnState === true) { + regex.state = state; + } + + return regex; +}; + +/** + * Create a regular expression from a parsed glob pattern. + * + * ```js + * const picomatch = require('picomatch'); + * const state = picomatch.parse('*.js'); + * // picomatch.compileRe(state[, options]); + * + * console.log(picomatch.compileRe(state)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `state` The object returned from the `.parse` method. + * @param {Object} `options` + * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. + * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. + * @return {RegExp} Returns a regex created from the given pattern. + * @api public + */ + +picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { + if (!input || typeof input !== 'string') { + throw new TypeError('Expected a non-empty string'); + } + + let parsed = { negated: false, fastpaths: true }; + + if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { + parsed.output = parse.fastpaths(input, options); + } + + if (!parsed.output) { + parsed = parse(input, options); + } + + return picomatch.compileRe(parsed, options, returnOutput, returnState); +}; + +/** + * Create a regular expression from the given regex source string. + * + * ```js + * const picomatch = require('picomatch'); + * // picomatch.toRegex(source[, options]); + * + * const { output } = picomatch.parse('*.js'); + * console.log(picomatch.toRegex(output)); + * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ + * ``` + * @param {String} `source` Regular expression source string. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +picomatch.toRegex = (source, options) => { + try { + const opts = options || {}; + return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); + } catch (err) { + if (options && options.debug === true) throw err; + return /$^/; + } +}; + +/** + * Picomatch constants. + * @return {Object} + */ + +picomatch.constants = constants; + +/** + * Expose "picomatch" + */ + +module.exports = picomatch; + + +/***/ }), + +/***/ 1781: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const utils = __nccwpck_require__(4059); +const { + CHAR_ASTERISK, /* * */ + CHAR_AT, /* @ */ + CHAR_BACKWARD_SLASH, /* \ */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_EXCLAMATION_MARK, /* ! */ + CHAR_FORWARD_SLASH, /* / */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_PLUS, /* + */ + CHAR_QUESTION_MARK, /* ? */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_RIGHT_SQUARE_BRACKET /* ] */ +} = __nccwpck_require__(5595); + +const isPathSeparator = code => { + return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; +}; + +const depth = token => { + if (token.isPrefix !== true) { + token.depth = token.isGlobstar ? Infinity : 1; + } +}; + +/** + * Quickly scans a glob pattern and returns an object with a handful of + * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), + * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not + * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). + * + * ```js + * const pm = require('picomatch'); + * console.log(pm.scan('foo/bar/*.js')); + * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {Object} Returns an object with tokens and regex source string. + * @api public + */ + +const scan = (input, options) => { + const opts = options || {}; + + const length = input.length - 1; + const scanToEnd = opts.parts === true || opts.scanToEnd === true; + const slashes = []; + const tokens = []; + const parts = []; + + let str = input; + let index = -1; + let start = 0; + let lastIndex = 0; + let isBrace = false; + let isBracket = false; + let isGlob = false; + let isExtglob = false; + let isGlobstar = false; + let braceEscaped = false; + let backslashes = false; + let negated = false; + let negatedExtglob = false; + let finished = false; + let braces = 0; + let prev; + let code; + let token = { value: '', depth: 0, isGlob: false }; + + const eos = () => index >= length; + const peek = () => str.charCodeAt(index + 1); + const advance = () => { + prev = code; + return str.charCodeAt(++index); + }; + + while (index < length) { + code = advance(); + let next; + + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + + if (code === CHAR_LEFT_CURLY_BRACE) { + braceEscaped = true; + } + continue; + } + + if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { + braces++; + + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (code === CHAR_LEFT_CURLY_BRACE) { + braces++; + continue; + } + + if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (braceEscaped !== true && code === CHAR_COMMA) { + isBrace = token.isBrace = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_RIGHT_CURLY_BRACE) { + braces--; + + if (braces === 0) { + braceEscaped = false; + isBrace = token.isBrace = true; + finished = true; + break; + } + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (code === CHAR_FORWARD_SLASH) { + slashes.push(index); + tokens.push(token); + token = { value: '', depth: 0, isGlob: false }; + + if (finished === true) continue; + if (prev === CHAR_DOT && index === (start + 1)) { + start += 2; + continue; + } + + lastIndex = index + 1; + continue; + } + + if (opts.noext !== true) { + const isExtglobChar = code === CHAR_PLUS + || code === CHAR_AT + || code === CHAR_ASTERISK + || code === CHAR_QUESTION_MARK + || code === CHAR_EXCLAMATION_MARK; + + if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + isExtglob = token.isExtglob = true; + finished = true; + if (code === CHAR_EXCLAMATION_MARK && index === start) { + negatedExtglob = true; + } + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + isGlob = token.isGlob = true; + finished = true; + break; + } + } + continue; + } + break; + } + } + + if (code === CHAR_ASTERISK) { + if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_QUESTION_MARK) { + isGlob = token.isGlob = true; + finished = true; + + if (scanToEnd === true) { + continue; + } + break; + } + + if (code === CHAR_LEFT_SQUARE_BRACKET) { + while (eos() !== true && (next = advance())) { + if (next === CHAR_BACKWARD_SLASH) { + backslashes = token.backslashes = true; + advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + isBracket = token.isBracket = true; + isGlob = token.isGlob = true; + finished = true; + break; + } + } + + if (scanToEnd === true) { + continue; + } + + break; + } + + if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { + negated = token.negated = true; + start++; + continue; + } + + if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { + isGlob = token.isGlob = true; + + if (scanToEnd === true) { + while (eos() !== true && (code = advance())) { + if (code === CHAR_LEFT_PARENTHESES) { + backslashes = token.backslashes = true; + code = advance(); + continue; + } + + if (code === CHAR_RIGHT_PARENTHESES) { + finished = true; + break; + } + } + continue; + } + break; + } + + if (isGlob === true) { + finished = true; + + if (scanToEnd === true) { + continue; + } + + break; + } + } + + if (opts.noext === true) { + isExtglob = false; + isGlob = false; + } + + let base = str; + let prefix = ''; + let glob = ''; + + if (start > 0) { + prefix = str.slice(0, start); + str = str.slice(start); + lastIndex -= start; + } + + if (base && isGlob === true && lastIndex > 0) { + base = str.slice(0, lastIndex); + glob = str.slice(lastIndex); + } else if (isGlob === true) { + base = ''; + glob = str; + } else { + base = str; + } + + if (base && base !== '' && base !== '/' && base !== str) { + if (isPathSeparator(base.charCodeAt(base.length - 1))) { + base = base.slice(0, -1); + } + } + + if (opts.unescape === true) { + if (glob) glob = utils.removeBackslashes(glob); + + if (base && backslashes === true) { + base = utils.removeBackslashes(base); + } + } + + const state = { + prefix, + input, + start, + base, + glob, + isBrace, + isBracket, + isGlob, + isExtglob, + isGlobstar, + negated, + negatedExtglob + }; + + if (opts.tokens === true) { + state.maxDepth = 0; + if (!isPathSeparator(code)) { + tokens.push(token); + } + state.tokens = tokens; + } + + if (opts.parts === true || opts.tokens === true) { + let prevIndex; + + for (let idx = 0; idx < slashes.length; idx++) { + const n = prevIndex ? prevIndex + 1 : start; + const i = slashes[idx]; + const value = input.slice(n, i); + if (opts.tokens) { + if (idx === 0 && start !== 0) { + tokens[idx].isPrefix = true; + tokens[idx].value = prefix; + } else { + tokens[idx].value = value; + } + depth(tokens[idx]); + state.maxDepth += tokens[idx].depth; + } + if (idx !== 0 || value !== '') { + parts.push(value); + } + prevIndex = i; + } + + if (prevIndex && prevIndex + 1 < input.length) { + const value = input.slice(prevIndex + 1); + parts.push(value); + + if (opts.tokens) { + tokens[tokens.length - 1].value = value; + depth(tokens[tokens.length - 1]); + state.maxDepth += tokens[tokens.length - 1].depth; + } + } + + state.slashes = slashes; + state.parts = parts; + } + + return state; +}; + +module.exports = scan; + + +/***/ }), + +/***/ 4059: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; +/*global navigator*/ + + +const { + REGEX_BACKSLASH, + REGEX_REMOVE_BACKSLASH, + REGEX_SPECIAL_CHARS, + REGEX_SPECIAL_CHARS_GLOBAL +} = __nccwpck_require__(5595); + +exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); +exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); +exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); +exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); +exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); + +exports.isWindows = () => { + if (typeof navigator !== 'undefined' && navigator.platform) { + const platform = navigator.platform.toLowerCase(); + return platform === 'win32' || platform === 'windows'; + } + + if (typeof process !== 'undefined' && process.platform) { + return process.platform === 'win32'; + } + + return false; +}; + +exports.removeBackslashes = str => { + return str.replace(REGEX_REMOVE_BACKSLASH, match => { + return match === '\\' ? '' : match; + }); +}; + +exports.escapeLast = (input, char, lastIdx) => { + const idx = input.lastIndexOf(char, lastIdx); + if (idx === -1) return input; + if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); + return `${input.slice(0, idx)}\\${input.slice(idx)}`; +}; + +exports.removePrefix = (input, state = {}) => { + let output = input; + if (output.startsWith('./')) { + output = output.slice(2); + state.prefix = './'; + } + return output; +}; + +exports.wrapOutput = (input, state = {}, options = {}) => { + const prepend = options.contains ? '' : '^'; + const append = options.contains ? '' : '$'; + + let output = `${prepend}(?:${input})${append}`; + if (state.negated === true) { + output = `(?:^(?!${output}).*$)`; + } + return output; +}; + +exports.basename = (path, { windows } = {}) => { + const segs = path.split(windows ? /[\\/]/ : '/'); + const last = segs[segs.length - 1]; + + if (last === '') { + return segs[segs.length - 2]; + } + + return last; +}; + + +/***/ }), + +/***/ 7898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var once = __nccwpck_require__(5560) +var eos = __nccwpck_require__(1424) +var fs = __nccwpck_require__(9896) // we only need fs to get the ReadStream and WriteStream prototypes var noop = function () {} var ancient = /^v?\.0/.test(process.version) @@ -25244,7 +29980,23 @@ module.exports = pump /***/ }), -/***/ 9273: +/***/ 4351: +/***/ ((module) => { + +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ +let promise + +module.exports = typeof queueMicrotask === 'function' + ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) + // reuse resolved promise, and allocate it lazily + : cb => (promise || (promise = Promise.resolve())) + .then(cb) + .catch(err => setTimeout(() => { throw err }, 0)) + + +/***/ }), + +/***/ 5475: /***/ ((module) => { "use strict"; @@ -25375,38 +30127,65 @@ module.exports = QuickLRU; /***/ }), -/***/ 6624: +/***/ 8824: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const tls = __nccwpck_require__(4016); +const tls = __nccwpck_require__(4756); + +module.exports = (options = {}, connect = tls.connect) => new Promise((resolve, reject) => { + let timeout = false; + + let socket; + + const callback = async () => { + await socketPromise; + + socket.off('timeout', onTimeout); + socket.off('error', reject); -module.exports = (options = {}) => new Promise((resolve, reject) => { - const socket = tls.connect(options, () => { if (options.resolveSocket) { - socket.off('error', reject); - resolve({alpnProtocol: socket.alpnProtocol, socket}); + resolve({alpnProtocol: socket.alpnProtocol, socket, timeout}); + + if (timeout) { + await Promise.resolve(); + socket.emit('timeout'); + } } else { socket.destroy(); - resolve({alpnProtocol: socket.alpnProtocol}); + resolve({alpnProtocol: socket.alpnProtocol, timeout}); } - }); + }; - socket.on('error', reject); + const onTimeout = async () => { + timeout = true; + callback(); + }; + + const socketPromise = (async () => { + try { + socket = await connect(options, callback); + + socket.on('error', reject); + socket.once('timeout', onTimeout); + } catch (error) { + reject(error); + } + })(); }); /***/ }), -/***/ 9004: +/***/ 4145: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -const Readable = __nccwpck_require__(2413).Readable; -const lowercaseKeys = __nccwpck_require__(9662); +const Readable = (__nccwpck_require__(2203).Readable); +const lowercaseKeys = __nccwpck_require__(1364); class Response extends Readable { constructor(statusCode, headers, body, url) { @@ -25441,7 +30220,7 @@ module.exports = Response; /***/ }), -/***/ 2113: +/***/ 844: /***/ ((module) => { "use strict"; @@ -25482,15 +30261,17 @@ module.exports = reusify /***/ }), -/***/ 5288: -/***/ ((module) => { +/***/ 2743: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /*! run-parallel. MIT License. Feross Aboukhadijeh */ module.exports = runParallel +const queueMicrotask = __nccwpck_require__(4351) + function runParallel (tasks, cb) { - var results, pending, keys - var isSync = true + let results, pending, keys + let isSync = true if (Array.isArray(tasks)) { results = [] @@ -25506,7 +30287,7 @@ function runParallel (tasks, cb) { if (cb) cb(err, results) cb = null } - if (isSync) process.nextTick(end) + if (isSync) queueMicrotask(end) else end() } @@ -25538,11 +30319,14 @@ function runParallel (tasks, cb) { /***/ }), -/***/ 2043: +/***/ 2560: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -;(function (sax) { // wrapper for non-node envs - sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } +;(function (sax) { + // wrapper for non-node envs + sax.parser = function (strict, opt) { + return new SAXParser(strict, opt) + } sax.SAXParser = SAXParser sax.SAXStream = SAXStream sax.createStream = createStream @@ -25559,9 +30343,18 @@ function runParallel (tasks, cb) { sax.MAX_BUFFER_LENGTH = 64 * 1024 var buffers = [ - 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', - 'procInstName', 'procInstBody', 'entity', 'attribName', - 'attribValue', 'cdata', 'script' + 'comment', + 'sgmlDecl', + 'textNode', + 'tagName', + 'doctype', + 'procInstName', + 'procInstBody', + 'entity', + 'attribName', + 'attribValue', + 'cdata', + 'script', ] sax.EVENTS = [ @@ -25582,10 +30375,10 @@ function runParallel (tasks, cb) { 'ready', 'script', 'opennamespace', - 'closenamespace' + 'closenamespace', ] - function SAXParser (strict, opt) { + function SAXParser(strict, opt) { if (!(this instanceof SAXParser)) { return new SAXParser(strict, opt) } @@ -25604,7 +30397,10 @@ function runParallel (tasks, cb) { parser.noscript = !!(strict || parser.opt.noscript) parser.state = S.BEGIN parser.strictEntities = parser.opt.strictEntities - parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.ENTITIES = + parser.strictEntities ? + Object.create(sax.XML_ENTITIES) + : Object.create(sax.ENTITIES) parser.attribList = [] // namespaces form a prototype chain. @@ -25614,6 +30410,12 @@ function runParallel (tasks, cb) { parser.ns = Object.create(rootNS) } + // disallow unquoted attribute values if not otherwise configured + // and strict mode is true + if (parser.opt.unquotedAttributeValues === undefined) { + parser.opt.unquotedAttributeValues = !strict + } + // mostly just for error reporting parser.trackPosition = parser.opt.position !== false if (parser.trackPosition) { @@ -25624,7 +30426,7 @@ function runParallel (tasks, cb) { if (!Object.create) { Object.create = function (o) { - function F () {} + function F() {} F.prototype = o var newf = new F() return newf @@ -25639,7 +30441,7 @@ function runParallel (tasks, cb) { } } - function checkBufferLength (parser) { + function checkBufferLength(parser) { var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) var maxActual = 0 for (var i = 0, l = buffers.length; i < l; i++) { @@ -25675,13 +30477,13 @@ function runParallel (tasks, cb) { parser.bufferCheckPosition = m + parser.position } - function clearBuffers (parser) { + function clearBuffers(parser) { for (var i = 0, l = buffers.length; i < l; i++) { parser[buffers[i]] = '' } } - function flushBuffers (parser) { + function flushBuffers(parser) { closeText(parser) if (parser.cdata !== '') { emitNode(parser, 'oncdata', parser.cdata) @@ -25694,29 +30496,39 @@ function runParallel (tasks, cb) { } SAXParser.prototype = { - end: function () { end(this) }, + end: function () { + end(this) + }, write: write, - resume: function () { this.error = null; return this }, - close: function () { return this.write(null) }, - flush: function () { flushBuffers(this) } + resume: function () { + this.error = null + return this + }, + close: function () { + return this.write(null) + }, + flush: function () { + flushBuffers(this) + }, } var Stream try { - Stream = __nccwpck_require__(2413).Stream + Stream = (__nccwpck_require__(2203).Stream) } catch (ex) { Stream = function () {} } + if (!Stream) Stream = function () {} var streamWraps = sax.EVENTS.filter(function (ev) { return ev !== 'error' && ev !== 'end' }) - function createStream (strict, opt) { + function createStream(strict, opt) { return new SAXStream(strict, opt) } - function SAXStream (strict, opt) { + function SAXStream(strict, opt) { if (!(this instanceof SAXStream)) { return new SAXStream(strict, opt) } @@ -25757,23 +30569,25 @@ function runParallel (tasks, cb) { me.on(ev, h) }, enumerable: true, - configurable: false + configurable: false, }) }) } SAXStream.prototype = Object.create(Stream.prototype, { constructor: { - value: SAXStream - } + value: SAXStream, + }, }) SAXStream.prototype.write = function (data) { - if (typeof Buffer === 'function' && + if ( + typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function' && - Buffer.isBuffer(data)) { + Buffer.isBuffer(data) + ) { if (!this._decoder) { - var SD = __nccwpck_require__(4304).StringDecoder + var SD = (__nccwpck_require__(3193).StringDecoder) this._decoder = new SD('utf8') } data = this._decoder.write(data) @@ -25796,7 +30610,10 @@ function runParallel (tasks, cb) { var me = this if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { me._parser['on' + ev] = function () { - var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + var args = + arguments.length === 1 ? + [arguments[0]] + : Array.apply(null, arguments) args.splice(0, 0, ev) me.emit.apply(me, args) } @@ -25819,30 +30636,34 @@ function runParallel (tasks, cb) { // without a significant breaking change to either this parser, or the // JavaScript language. Implementation of an emoji-capable xml parser // is left as an exercise for the reader. - var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var nameStart = + /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ - var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + var nameBody = + /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ - var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ - var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + var entityStart = + /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = + /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ - function isWhitespace (c) { + function isWhitespace(c) { return c === ' ' || c === '\n' || c === '\r' || c === '\t' } - function isQuote (c) { - return c === '"' || c === '\'' + function isQuote(c) { + return c === '"' || c === "'" } - function isAttribEnd (c) { + function isAttribEnd(c) { return c === '>' || isWhitespace(c) } - function isMatch (regex, c) { + function isMatch(regex, c) { return regex.test(c) } - function notMatch (regex, c) { + function notMatch(regex, c) { return !isMatch(regex, c) } @@ -25883,271 +30704,271 @@ function runParallel (tasks, cb) { CLOSE_TAG: S++, // SCRIPT: S++, //