0.0.81 • Published 8 years ago

angular-midway v0.0.81

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

angular-midway

This is an extention of angular-mock based on version 1.4.8, which supports CucumberJS. I suggest you to use karma-cucumber-js

Most of the method were just simply copied from angular-mock,

Please don't hesitate to contact me if you have any concerns.

Inspiration

angular-mocks

ng-midway-tester

Getting Started

npm install jquery --save-dev
npm install cucumber --save-dev
npm install karma-cucumber-js --save-dev
npm install angular-midway --save-dev

For more configuration information please see karma-cucumber-js

Step Definitions

Please ensure that you have already setup the environment according to karma-cucumber-js guidline. And then in the step definition add additional callback, it's not a good way, but you have to, I will improve it in the feature.

__adapter__.addStepDefinitions(function (scenario) {
    window.Cucumber.callback(scenario); // Don't forget to add this line
    scenario.Given(/^there is a test step$/, function () { });
    scenario.When(/^it is executed$/, function () { });
    scenario.When(/^it is not executed$/, function (callback) { return callback.pending(); });
    scenario.Then(/^test succeeds$/, function () { });
    scenario.Then(/^test fails$/, function (callback) { return callback(new Error('Step failed')); });
});

Issues

Please tell me any issues you have detected or any innovate ideas and submit them here.

Let's make it better together.

0.0.81

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago