Skip to content

Testing

mickannor edited this page Aug 9, 2022 · 14 revisions

Overview

This page is intended to introduce users to the format bris developers used to write test and create test suites. Testing is crucial to ensure every part of bris run effectively and efficiently, as such all tests need to pass with 100% certainty before able to merge. Jest along with Node.js is used as the testing framework for B-RIS.

Writing Test

Test files can be identified by .test.js (Example: inverse.test.js). There are test suites for each rule in use, 13 in total. Test cases uses toBeTruthy and toBeFalsy to assert the equivalence of statement1 and statement2 under the chosen rule. Examples of the format used to write test can be found under verifiers then under the specific rule. Example, verifiers -> Association -> Association.test.js

Running Test

To run tests first clone the repository and ensure that you have installed the most current versions of npm and node.js. Steps to install npm and node.js can be found here. Open your terminal and switch to the appropriate directory and run nom run test.

Clone this wiki locally