Skip to content

Commit 40550ed

Browse files
committed
use node --run
1 parent db30fbc commit 40550ed

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/lint-and-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,8 @@ jobs:
188188
- name: Run Unit Tests
189189
# We want to run Unit Tests in every circumstance, including Crowdin PRs and Dependabot PRs to ensure
190190
# that changes to dependencies or translations don't break the Unit Tests
191-
# We want to enforce that the actual `turbo@latest` package is used instead of a possible hijack from the user
192191
# the `${{ needs.base.outputs.turbo_args }}` is a string substitution happening from the base job
193-
run: NODE_OPTIONS="--test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=junit.xml --test-reporter=@reporters/github --test-reporter-destination=stdout" npx --package=turbo@latest -- turbo test:unit ${{ needs.base.outputs.turbo_args }}
192+
run: node --run test:ci -- ${{ needs.base.outputs.turbo_args }}
194193

195194
- name: Start Visual Regression Tests (Chromatic)
196195
# This assigns the Environment Deployment for Storybook

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"prettier:fix": "npm run prettier -- --write",
3434
"format": "npm run lint:fix && npm run prettier:fix",
3535
"test": "turbo test:unit",
36+
"test:ci": "cross-env NODE_OPTIONS=\"--test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=junit.xml --test-reporter=@reporters/github --test-reporter-destination=stdout --test-reporter=spec --test-reporter-destination=stdout\" turbo test:unit",
3637
"prepare": "husky"
3738
},
3839
"dependencies": {

tests/utilities.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// This helper checks if a given element is visible.
2+
// Asserting the output of this is the equal of running
3+
// expect(element).toBeVisible()
14
export function isVisible(element) {
25
while (element) {
36
const style = element.ownerDocument.defaultView.getComputedStyle(element);

0 commit comments

Comments
 (0)