Skip to content

Commit 0359bef

Browse files
authored
Merge pull request #9 from doodybrains/master
Add I Think test for testing
2 parents 64d02f1 + 2211be3 commit 0359bef

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

sketch.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ function nOfFibonacci(x) {
4848
return (!n || n < 1) ? -1 : (n < 3 ? 1 : (nOfFibonacci(n-1) + nOfFibonacci(n-2)));
4949
}
5050

51+
function iThink(thisThing, thatThing) {
52+
return "I think " + thisThing + " but " + thatThing + ".";
53+
}
54+
5155
module.exports = {
5256
sum: sum,
5357
sub: sub,
@@ -59,5 +63,6 @@ module.exports = {
5963
anomalyCode: anomalyCode,
6064
fahrenheit2Celcius: fahrenheit2Celcius,
6165
power: power,
62-
nOfFibonacci: nOfFibonacci
66+
nOfFibonacci: nOfFibonacci,
67+
iThink: iThink
6368
}

sketch.test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
const { sum, sub, prod, digital_root, sum42, sayHelloTo, anomalyCode, fahrenheit2Celcius, power, nOfFibonacci } = require('./sketch');
1+
const { sum, sub, prod, digital_root, sum42, sayHelloTo, anomalyCode, fahrenheit2Celcius, power, nOfFibonacci, iThink } = require('./sketch');
32

43

54
const fs = require("fs");
@@ -121,6 +120,10 @@ test('the 20th number of fibonacci should be 6765', () => {
121120
expect(nOfFibonacci(20)).toBe(6765);
122121
})
123122

123+
test('I think...', () => {
124+
expect(iThink("tests are annoying", "I appreciate them")).toBe("I think tests are annoying but I appreciate them.");
125+
})
126+
124127
const testUrlInMarkdown = (file) => {
125128
let markdown = fs.readFileSync(file).toString();
126129
let urls = [];

0 commit comments

Comments
 (0)