The Fonteva Unit Testing Framework can be installed on Windows, Mac, or Linux. To install:
Install the latest version (presently version 10).
Windows version is an .msi installer (https://nodejs.org/en/)
- Mac version is a pkg file (https://nodejs.org/en/download/)
If installing on Linux, do not use the standard Linux repositories. Instead – for example, on Debian-based systems – use:
curl npm test -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejsBASH
- For other OSs, see https://nodejs.org/en/download/
npm is a package manager that should be installed along with nodejs. You can verify its installation with the command below.
- Install Yarn - yarnpkg.com
Fonteva's libraries allow you to execute your entire test/coverage suite or reinstall the suite to create a clean slate.
The main libraries are:
- chai - Assertion library (http://www.chaijs.com/).
- sinon-chai - Fonteva's mock utility. Anytime you are interacting with something, like window.location, or the document object, or the component object in Salesforce, Fonteva mocks that functionality out. For example, if you want to use $A.util.addclass, the suite executes that functionality because mocha is injected into Fonteva's testing framework (http://sinonjs.org/).
- lodash - A helper library that has lots of utility methods in it (https://lodash.com/).
- istanbul - Fonteva's coverage library (https://istanbul.js.org/).