Coder Social home page Coder Social logo

wallaby-test-ts's Introduction

Setup

rm -rf node_modules
npm install

Run

npm start

Test

npm test

Uses jest.

Tests can also be run by Wallaby.js VsCode & IntelliJ plugin, the automatic configuration should work.

You can also build it and run the .js version of the tests:

npm run tsc
npm run test-js

Mutation Test

npm run mutation-test

Uses Stryker Mutator. List of Mutators.

Dependencies

Tested with

  • node 14 & 15

  • Windows 10, cmd & powershell

  • Windows 10, WSL, Ubuntu 20.04

  • Ubuntu 18.04

  • Visual Studio Code

  • IntelliJ IDEA Ultimate 2021

Solution

expect(isSingleDigitExcept5(0)).toBe(true);
expect(isSingleDigitExcept5(10)).toBe(false);
expect(isSingleDigitExcept5(5)).toBe(false);
expect(isSingleDigitExcept5(-1)).toBe(false);
expect(isSingleDigitExcept5(9)).toBe(true);

Known issues

It seems that with node 18, many mutations just time out and the tests take very long to run?! Use node 16 and or ignore timeouts...

It looks like this might also be due to general Windows 11 and WSL slowness.

Prefer the native version and expect no tests to fail because of timeout with no mutant.

wallaby-test-ts's People

Contributors

masterxilo 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.