Skip to content

Commit

Permalink
updated dates so tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
MelSumner committed Jan 23, 2024
1 parent fce8917 commit 0185603
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
],
"scripts": {
"clean": "rm -rf dist node_modules test-app/node_modules",
"link-test-app": "addon-dev link-test-app",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
"lint:devdeps": "addon-dev sync-dev-deps --lint",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:devdeps": "addon-dev sync-dev-deps --lint",
"prepare": "npm-run-all prepublishOnly link-test-app",
"prepublishOnly": "rollup --config",
"scenario:list": "scenario-tester list --files test-app/scenarios.js",
"scenario:output": "scenario-tester output --files test-app/scenarios.js --outdir scenario --scenario ",
"scenario:run": "cd test-app && qunit scenarios.js --filter ",
"start": "npm-run-all --parallel start:*",
"start:test-app": "cd test-app && ember serve",
"start:build": "rollup --config --watch",
"start:test-app": "cd test-app && ember serve",
"sync-dev-deps": "addon-dev sync-dev-deps",
"test": "npm-run-all lint:* test:*",
"test:ember": "cd test-app && ember test",
"test:ember-compatibility": "cd test-app && qunit scenarios.js",
"prepare": "npm-run-all prepublishOnly link-test-app",
"link-test-app": "addon-dev link-test-app",
"prepublishOnly": "rollup --config"
"test:ember-compatibility": "cd test-app && qunit scenarios.js"
},
"dependencies": {
"@embroider/addon-shim": "^0.50.2",
Expand Down Expand Up @@ -124,7 +124,7 @@
}
},
"engines": {
"node": ">= 12"
"node": ">= 16"
},
"ember-addon": {
"version": 2,
Expand All @@ -137,7 +137,7 @@
}
},
"volta": {
"node": "14.17.5",
"node": ">16",
"yarn": "1.22.11"
},
"release-it": {
Expand Down
13 changes: 6 additions & 7 deletions test-app/tests/integration/components/pikaday-input-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,22 @@ module('Integration | Component | pikaday-input', function (hooks) {
});

test('selecting a date should send an action', async function (assert) {
const expectedDate = new Date(2013, 3, 28);
const expectedDate = new Date(2024, 1, 21);

this.set('onSelection', function (selectedDate) {
assert.deepEqual(selectedDate, expectedDate);
});

await render(hbs`
<PikadayInput @onSelection={{this.onSelection}}/>
<PikadayInput @onSelection={{this.onSelection}} />
`);

await click('input');
await Interactor.selectDate(expectedDate);
});

test('selecting multiple dates should send actions', async function (assert) {
const expectedDate1 = new Date(2013, 3, 28);
const expectedDate2 = new Date(2014, 4, 1);
const expectedDate1 = new Date(2024, 1, 15);
const expectedDate2 = new Date(2024, 1, 19);

this.set('onSelection1', function (selectedDate) {
assert.deepEqual(selectedDate, expectedDate1);
Expand Down Expand Up @@ -376,7 +375,7 @@ module('Integration | Component | pikaday-input', function (hooks) {
});

test('if utc is set the date returned from pikaday should be in UTC format', async function (assert) {
const expectedDate = new Date(Date.UTC(2013, 3, 28));
const expectedDate = new Date(Date.UTC(2024, 1, 21));
this.set('onSelection', function (selectedDate) {
assert.deepEqual(selectedDate, expectedDate);
});
Expand All @@ -387,7 +386,7 @@ module('Integration | Component | pikaday-input', function (hooks) {

await click('input');

await Interactor.selectDate(new Date(2013, 3, 28));
await Interactor.selectDate(new Date(2024, 1, 21));
});

[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module('Integration | Component | pikaday-inputless', function (hooks) {
});

test('selecting a date should send an action', async function (assert) {
const expectedDate = new Date(2013, 3, 28);
const expectedDate = new Date(2024, 1, 20);
const onSelection = td.function();
this.set('onSelection', onSelection);

Expand Down

0 comments on commit 0185603

Please sign in to comment.