Skip to content
Snippets Groups Projects
Commit ab507bb1 authored by Andrej Rasevic's avatar Andrej Rasevic
Browse files

adding test harness

parent 32704263
No related branches found
No related tags found
No related merge requests found
// Make a smaller array of the test data to run on
// and export it
// e.g. 3 presidents born in the 1800's , 2 in the pre 1800's and 1 post 1800's
// import data from testData.js and assign it to a variable
function testFilter(testData, expectedData) {
let result = testData.filter()
if (result === expectedData) {
console.log('filter passed')
} else {
// can also throw an error
console.log('filter failed')
}
}
testFilter()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment