Skip to content

Commit

Permalink
lerna alias jest; collect coverage from src
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujinxuan committed Jun 13, 2018
1 parent 9a693a6 commit 75946a4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const { jest: lernaAliases } = require('lerna-alias')

module.exports = {
verbose: true,
collectCoverageFrom: ['**/src/**', '!**/test/**', '!**/lib/*.js'],
moduleNameMapper: lernaAliases(),
collectCoverageFrom: ['**/src/**', '!**/test/**'],
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"jest": "^23.1.0",
"jsdom": "^11.5.1",
"lerna": "^2.7.1",
"lerna-alias": "^3.0.2",
"lodash": "^4.17.4",
"matcha": "^0.7.0",
"npm-run-all": "^4.1.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/slate/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Dependencies.
*/

import { resetKeyGenerator } from '..'
import { resetKeyGenerator } from '../src/'

/**
* Tests.
Expand All @@ -16,6 +16,7 @@ describe('slate', () => {
beforeEach(() => {
resetKeyGenerator()
})

require('./serializers')
require('./schema')
require('./changes')
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3723,6 +3723,12 @@ get-document@1:
version "1.0.0"
resolved "https://registry.yarnpkg.com/get-document/-/get-document-1.0.0.tgz#4821bce66f1c24cb0331602be6cb6b12c4f01c4b"

get-lerna-packages@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/get-lerna-packages/-/get-lerna-packages-0.1.0.tgz#f7cf4b358584d98f24cd931451e56ee9d37094e5"
dependencies:
glob "^7.1.2"

get-pkg-repo@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d"
Expand Down Expand Up @@ -5323,6 +5329,12 @@ left-pad@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"

lerna-alias@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lerna-alias/-/lerna-alias-3.0.2.tgz#61d7d79b182849e98ee4cdca0127f714f8712d4d"
dependencies:
get-lerna-packages "^0.1.0"

lerna@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.7.1.tgz#abd536376eca5e9f41a6d611da5b744534ef906f"
Expand Down

0 comments on commit 75946a4

Please sign in to comment.