Code Monkey home page Code Monkey logo

wallaby-lerna4-yarn2's Introduction

wallaby-yarn2: Updated

testing

steps Wallaby

  1. yarn install (have yarn 2 installed)
  2. connect wallaby.jsto IDE (I'm using WebStorm)

Actual:

0 failing tests, 1 passing  Launch Coverage/Test Explorer

Cannot use import statement outside a module
	at node_modules/@company/core-sdk/tests/unit/core.test.ts:3

jest CLI

  1. yarn install
  2. yarn run test

Actual:

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run test"
lerna info run Ran npm script 'test' in '@company/core-sdk' in 3.4s:

lerna success run Ran npm script 'test' in 1 package in 3.4s:
lerna success - @company/core-sdk

testing with coverage

There are new pieces added to the jest.unit.preset, which omit certain files for coverage.

in here it is:

{
  collectCoverageFrom: [
    '!**/tests/integration/**',
    '!**/**/.eslintrc.js',
    '!**/**/jest.config.js',
    '!**/**/jest.integration.config.js'
  ]
}

steps Wallaby

  1. yarn install (have yarn 2 installed)
  2. connect wallaby.jsto IDE (I'm using WebStorm)

Actual Observations:

/packages/core-sdk/lib/index.ts

Webstorm no boxes (red/green/grey showing coverage) (is bad) Wallabyjs localhost 0 files covered (and shows an error) (is bad)

Actual Observations:

/packages/core-sdk/tests/unit/core.test.ts

Webstorm has boxes (red/green/grey are showing coverage) (is good) Wallabyjs localhost [Test] shows nested describes and tests down to a check (is good)

jest CLI

  1. yarn install
  2. yarn run test:cov

Actual:

lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run test:cov"
lerna info run Ran npm script 'test:cov' in '@company/core-sdk' in 2.9s:
----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------|---------|----------|---------|---------|-------------------
All files |     100 |      100 |     100 |     100 |                   
 index.ts |     100 |      100 |     100 |     100 |                   
----------|---------|----------|---------|---------|-------------------
lerna success run Ran npm script 'test:cov' in 1 package in 2.9s:
lerna success - @company/core-sdk

From above, jest cli shows coverage for index.ts

wallaby-lerna4-yarn2's People

Contributors

kvernon avatar smcenlly avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.