Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[lwc-jest legacy branch] Prerelease --> master for Winter '20 #101

Merged
merged 5 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:8
- image: circleci/node:lts

steps:
- checkout
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@salesforce/lwc-jest",
"version": "0.5.5",
"version": "0.6.1",
"description": "Run Jest against LWC components in a Salesforce DX workspace environment",
"main": "src/index.js",
"license": "MIT",
Expand All @@ -20,14 +20,15 @@
"test": "jest"
},
"dependencies": {
"@lwc/compiler": "0.37.4-220.2",
"@lwc/engine": "0.37.4-220.2",
"@lwc/jest-preset": "0.37.4-220.2",
"@lwc/jest-resolver": "0.37.4-220.2",
"@lwc/jest-serializer": "0.37.4-220.2",
"@lwc/jest-transformer": "0.37.4-220.2",
"@lwc/module-resolver": "0.37.4-220.2",
"@lwc/wire-service": "0.37.4-220.2",
"@lwc/compiler": "1.0.2-222.23",
"@lwc/engine": "1.0.2-222.23",
"@lwc/jest-preset": "2.2.0",
"@lwc/jest-resolver": "2.2.0",
"@lwc/jest-serializer": "2.2.0",
"@lwc/jest-transformer": "2.2.0",
"@lwc/module-resolver": "1.0.2-222.23",
"@lwc/synthetic-shadow": "1.0.2-222.23",
"@lwc/wire-service": "1.0.2-222.23",
"@salesforce/wire-service-jest-util": "^2.2.5",
"chalk": "^2.3.0",
"glob": "^7.1.2",
Expand Down
10 changes: 6 additions & 4 deletions scripts/upgrade-lwc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT

LWC_VERSION=$1
LWC_TEST_VERSION=$2

yarn upgrade @lwc/compiler@$LWC_VERSION
yarn upgrade @lwc/engine@$LWC_VERSION
yarn upgrade @lwc/jest-resolver@$LWC_VERSION
yarn upgrade @lwc/jest-serializer@$LWC_VERSION
yarn upgrade @lwc/jest-transformer@$LWC_VERSION
yarn upgrade @lwc/module-resolver@$LWC_VERSION
yarn upgrade @lwc/wire-service@$LWC_VERSION
yarn upgrade @lwc/jest-preset@$LWC_VERSION

yarn upgrade @lwc/jest-resolver@$LWC_TEST_VERSION
yarn upgrade @lwc/jest-serializer@$LWC_TEST_VERSION
yarn upgrade @lwc/jest-transformer@$LWC_TEST_VERSION
yarn upgrade @lwc/jest-preset@$LWC_TEST_VERSION
4 changes: 3 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'use strict';

const path = require('path');
const jestPreset = require('@lwc/jest-preset');
const {
PROJECT_ROOT,
getModulePaths,
Expand All @@ -23,6 +24,7 @@ function getCoveragePaths() {
const jestConfig = {
rootDir: PROJECT_ROOT,
moduleFileExtensions: ['js', 'html'],
testEnvironment: jestPreset.testEnvironment || 'jsdom',
transform: {
'^.+\\.(js|html|css)$': require.resolve('@lwc/jest-transformer')
},
Expand All @@ -38,7 +40,7 @@ const jestConfig = {
],
};

const expectedApiVersion = '46.0';
const expectedApiVersion = '47.0';

// Execute command is different on Windows.
const jestPath = process.platform == 'win32' ? './node_modules/jest/bin/jest.js' : 'node_modules/.bin/jest';
Expand Down
Loading