diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d26a6c3c..68ac9a7b 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -9,6 +9,6 @@ jobs: - name: Use Node.js 20 uses: actions/setup-node@v4 with: - node-version: 20 + node-version: [20.x] - run: npm ci - run: npm run validate:ci diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 00000000..7188a2c3 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,18 @@ +name: Unit Tests +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: [20.x] + - run: npm ci + - run: npm run test diff --git a/commerce/src/defaults.js b/commerce/src/defaults.js index 75fb888e..46921d00 100644 --- a/commerce/src/defaults.js +++ b/commerce/src/defaults.js @@ -16,6 +16,7 @@ export const Defaults = Object.freeze({ displayPerUnit: false, displayRecurrence: true, displayTax: false, + domainSwitch: false, env: Env.PRODUCTION, forceTaxExclusive: false, language: 'en', diff --git a/package.json b/package.json index fe8d637c..effa3d56 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "private": true, "workspaces": ["web-components", "commerce"], "scripts": { + "test": "npm run test:commerce && npm run test:web-components", + "test:commerce": "cd commerce && npm run test:ci", + "test:web-components": "cd web-components && npm run test:ci", "validate:ci": "npm run validate:commerce && npm run validate:web-components", "validate:commerce": "cd commerce && npm run test:ci && npm run build", "validate:web-components": "cd web-components && npm run test:ci && npm run build"