Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Run tests on windows#1111

New issue

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

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

Already on GitHub?Sign in to your account

Merged
baev merged 26 commits intomainfromrun-tests-windows
Sep 16, 2024
Merged

Run tests on windows#1111

baev merged 26 commits intomainfromrun-tests-windows
Sep 16, 2024

Conversation

@baev
Copy link
Member

Context

Checklist

@github-actionsgithub-actionsbot added theme:apiJavascript API related issue theme:cucumberjsCucumberJS related issue labelsAug 15, 2024
@github-actionsgithub-actionsbot added the theme:jasmineJasmine related issue labelAug 19, 2024
@github-actionsgithub-actionsbot added the theme:jestJest related issue labelAug 19, 2024
@github-actionsgithub-actionsbot added the theme:mochaMocha related issue labelAug 27, 2024
baevand others added11 commitsSeptember 10, 2024 17:33
@delatrie
Copy link
Collaborator

delatrie commentedSep 16, 2024
edited
Loading

Running tests on Windows

The PR fixes test utilities of all packages to be runnable on Windows. New CI jobs will build & test packages on Windows in all future PRs.

Typescript configuration files for testing

Previously, test files were covered bytsconfig.test.json files in the root of each package. That didn't play well with some IDEs because, when analyzing a file, they expecttsconfig.json to be present in the file directory or its parent. In this PR I've put those config files in thetest directories and renamed them totsconfig.json. Vitest and ESlint configs have been adjusted.

Casing of environment labels

Given the following two environment variables:

  • ALLURE_LABEL_foo=bar
  • ALLURE_LABEL_FOO=baz

When we give them to a process, it receives either two distinct variables (Linux, Mac) or just one (Windows).
Since the behavior differs across OS, I've removed the corresponding checks from the environment variable tests.

OS- and CWD-consistency of test results

All packages now calculatefullName,package,testCaseId, andhistoryId in a way that doesn't depend on OS and CWD:

  • On Windows, paths are converted to POSIX-paths (\ chars are replaced with/).
  • Relative paths are resolved against the project root (the nearest directory, starting from the CWD, that containspackage.json). That allows getting consistent results when running tests from project subdirectories. If there is no project root, the CWD is used as a fallback.

The list of packages, fixed by this PR:

  • allure-cucumberjs
  • allure-cypress
  • allure-jasmine
  • allure-jest
  • allure-mocha
  • allure-playwright
  • allure-vitest

Allure-codeceptjs uses allure-mocha under the hood, which means it automatically inherits those behaviors.

Newman-reporter-allure doesn't use FS paths, so it doesn't need to be fixed.

Allure-mocha testCaseId collision

Allure-mocha mistakenly doesn't use the test file path when calculatingtestCaseId of a test. This PR fixes that.

@baevbaev merged commit5ee7a1e intomainSep 16, 2024
@baevbaev deleted the run-tests-windows branchSeptember 16, 2024 14:37
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@epszawepszawepszaw approved these changes

Assignees

No one assigned

Labels

theme:apiJavascript API related issuetheme:codeceptjstheme:cucumberjsCucumberJS related issuetheme:jasmineJasmine related issuetheme:jestJest related issuetheme:mochaMocha related issuetheme:newmantheme:playwrighttheme:vitesttheme:workflowtype:internal

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fullName and testCaseId calculations are inconsistent between OS and CWD

4 participants

@baev@delatrie@epszaw

[8]ページ先頭

©2009-2025 Movatter.jp