Skip to content

Commit

Permalink
add flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
andyatmiami committed Dec 5, 2024
1 parent 7f9756a commit acfcc01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion javascript/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ function someFunc(arg1, arg2) {
return _.has(arg1, arg2);
}

function flaky(arg1, arg2) {
return Math.random() < 0.5
}

function dummyFunc() {
return true
}

export { dummyFunc, someFunc };
export { dummyFunc, someFunc, flaky };
7 changes: 6 additions & 1 deletion javascript/function.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { dummyFunc } from "./function";
import { dummyFunc, flaky } from "./function";

test('baseline', () => {
expect(dummyFunc()).toBe(true);
}
);

test('flaky', () => {
expect(flaky()).toBe(true);
}
);

0 comments on commit acfcc01

Please sign in to comment.