1.0.0 • Published 5 years ago

karma-jasmine-bridge v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

karma-jasmine-bridge.js

Build Status

What is it ?

This plugins allows to add support of APIs from Jasmine 1 into Jasmine 2 or Jasmine 3 environment.

List of API supported:

  • runs
  • waitsFor
  • waits
  • Spy API :
    • spy.andCallThrough();
    • spy.andCallFake(function() {});
    • spy.andThrow('error');
    • spy.andReturn(1);
    • spy.reset()
    • spy.callCount
    • spy.mostRecentCall.args
    • spy.calls0.args
    • spy.argsForCall0
  • Clock API:
    • useMock()
    • tick()
  • CustomMatcher API

Why ?

Because legacy applications which have a lot of tests with Jasmine need to be moved slowly when developers remove technical debt.

So with this plugin you can run your legacy tests (Jasmine1) on a Jasmine2 environmment without change anything (almost :)) and when you get ready you can modify your unit tests little by little by making a migration on Jasmine 2 API.

How to install ?

npm install karma-jasmine-bridge

Adds this in your karma-conf.js

frameworks: ['jasmine-bridge', 'jasmine'],

the order matters because bridge wraps jasmine features so plugin must be loaded before jasmine. Here, of course it's about a jasmine 2 or 3 env.

Tests

npm.io

This project is tested with browserstack platform. I choose this platform because automate system is very easy to be configured and result is quick. Thanks to help me to have a complete environnement.

Supported Browsers : IE > 9 , Firefox, Chrome, Safari (see karma-conf to have complete list of platforms.)

1.0.0

5 years ago

0.10.1

5 years ago

0.10.0

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago