We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cc10a98 + 42954a2 commit 1e1fca7Copy full SHA for 1e1fca7
exercises/141-multiply/test.js
@@ -1,3 +1,5 @@
1
+const fs = require('fs');
2
+const path = require('path');
3
const rewire = require('rewire');
4
const multiply = rewire('./app.js').__get__('multiply');
5
@@ -30,6 +32,7 @@ test('Given 2 integer numbers, multiply and return the total. Testing with diffe
30
32
});
31
33
34
test('Must not use the * operator', () => {
- let multiplyOperator = '*';
- expect(multiplyOperator).not.toBe(multiply);
35
+ const file = fs.readFileSync(path.resolve(__dirname, './app.js'), 'utf8');
36
+ const regex = /\s*\*\s*/gm
37
+ expect(regex.test(file.toString())).toBeFalsy();
38
0 commit comments