Skip to content

Commit 9099fe3

Browse files
committed
add small test and remove redundant default parameter value
1 parent c5fcd72 commit 9099fe3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/__tests__/config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ describe('configuration API', () => {
4242

4343
describe('RTL options', () => {
4444
test('configure can set by a plain JS object', () => {
45-
configure({reactStrictMode: true})
45+
const advanceTimers = jest.fn()
46+
configure({reactStrictMode: true, advanceTimers})
4647

4748
expect(getConfig().reactStrictMode).toBe(true)
49+
expect(getConfig().advanceTimers).toBe(advanceTimers)
4850
})
4951

5052
test('configure can set by a function', () => {

src/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function jestFakeTimersAreEnabled() {
1717
return false
1818
}
1919

20-
function maybeAdvanceJestTimers(delay = 0) {
20+
function maybeAdvanceJestTimers(delay) {
2121
if (jestFakeTimersAreEnabled()) {
2222
jest.advanceTimersByTime(delay)
2323
}

0 commit comments

Comments
 (0)