faltest
faltest copied to clipboard
How do I use chai assertions
I see that there is a chai package, and that it exports chaiWebDriver, what's that do and where do I put it?
The answer:
create a new file containing:
const chai = require('chai');
const chaiWebDriver = require('@faltest/chai');
chai.use(chaiWebDriver); // provides page object apis
chai.use(require('chai-string'));
chai.use(require('chai-fs'));
chai.use(require('chai-as-promised')); // provides "eventually"
module.exports = chai;
then require that file:
const { expect } = require('path/to/that/file');