How to use the chai-nightwatch.expect function in chai-nightwatch

To help you get started, we’ve selected a few chai-nightwatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nightwatchjs / nightwatch / lib / api / expect / _baseExpect.js View on Github external
createInstance() {
    this.promise = this.createPromise();
    this.__instance = chai.expect(this.promise);

    if (!this.hasAssertions) {
      this.flag('valueFlag', true);
    }
    this.flag('emitter', this);
    this.flag('api', this.client.api);
    this.flag('promise', this.promise);
  }
github nightwatchjs / nightwatch / lib / api / expect.js View on Github external
Expect.element = function(selector, using) {
    var element = new Element(selector, using);
    var promise = element.promise();
    var expect  = chai.expect(promise);

    flag(expect, 'selector', selector);
    flag(expect, 'promise', promise);
    flag(expect, 'element', element);

    return {
      element : element,
      expect : expect
    };
  };
github nightwatchjs / nightwatch / lib / api-loader / expect / _expect-loader.js View on Github external
createInstance() {
    this.promise = this.createPromise();
    this.__instance = chai.expect(this.promise);

    flag(this.instance, 'promise', this.promise);
  }

chai-nightwatch

This is a trimmed down version of Chai to support Nightwatch.js related assertions.

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis

Similar packages