Skip to content

Commit 47128fa

Browse files
committed
Merge branch 'master' of github.com:wix/react-native-calendars into release
2 parents 95418db + 91c633e commit 47128fa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build:docs": "node ./scripts/build-docs.js",
1212
"e2e": "node ./scripts/test-e2e.js --release",
1313
"test": "npm run lint && npm run unit",
14+
"test:watch": "jest --watch",
1415
"test:perf": "TEST_RUNNER_ARGS='--testMatch **/*.perf.js' reassure measure",
1516
"unit": "jest",
1617
"lint": "eslint src/ example/src --ext .tsx,.ts,.js",

src/expandableCalendar/__test__/index.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('ExpandableCalendar', () => {
183183
it.each([[Direction.LEFT],[Direction.RIGHT]])(`should call onDateChanged and onMonthChanged to next month first day when pressing the %s arrow`, (direction: Direction) => {
184184
driver.toggleKnob();
185185
jest.runAllTimers();
186-
const expectedDate = today.clone().addMonths(direction === Direction.RIGHT ? 1 : -1).setDate(1);
186+
const expectedDate = today.clone().setDate(1).addMonths(direction === Direction.RIGHT ? 1 : -1);
187187
driver.pressOnHeaderArrow({left: direction === Direction.LEFT});
188188
expect(onDateChanged).toHaveBeenCalledWith(toMarkingFormat(expectedDate), UpdateSources.PAGE_SCROLL);
189189
expect(onMonthChange).toHaveBeenCalledWith(xdateToData(expectedDate), UpdateSources.PAGE_SCROLL);
@@ -208,7 +208,7 @@ describe('ExpandableCalendar', () => {
208208
driver.pressOnHeaderArrow({left: false});
209209
});
210210
jest.runAllTimers();
211-
const expectedFutureDate = today.clone().addMonths(6).setDate(1);
211+
const expectedFutureDate = today.clone().setDate(1).addMonths(6);
212212
expect(onDateChanged).toHaveBeenNthCalledWith(6, toMarkingFormat(expectedFutureDate), UpdateSources.PAGE_SCROLL);
213213
expect(onMonthChange).toHaveBeenNthCalledWith(6, xdateToData(expectedFutureDate), UpdateSources.PAGE_SCROLL);
214214
times(6, () => driver.pressOnHeaderArrow({left: true}));

0 commit comments

Comments
 (0)