Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Apr 12, 2022
1 parent 01ec5fe commit 161c530
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/coalesce-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
"transform": {
"^.+\\.(j|t)sx?$": "ts-jest"
},
"globals": {
"ts-jest": {
"useESM": true
}
},
"extensionsToTreatAsEsm": [".ts"],
"collectCoverageFrom": [
"src/**",
"!src/index.ts"
Expand All @@ -77,7 +83,8 @@
"^vue$": "vue/dist/vue.common.js",
"//": "Map the esm version of libs to the non-esm for the tests - jest doesn't do well with es modules & typescript. By some sheer chance of luck, the import statements can be written the same between the es and non-es versions of the files.",
"^date-fns/esm$": "date-fns",
"lodash-es(.*)": "lodash$1"
"lodash-es(.*)": "lodash$1",
"(.+)\\.js": "$1"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
Expand Down
2 changes: 1 addition & 1 deletion src/coalesce-vue/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ class DisplayVisitor extends Visitor<
formatString = "M/d/yyyy";
break;
default:
formatString = "M/d/yyyy h:mm:ss aaa";
formatString = "M/d/yyyy h:mm:ss aa";
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/coalesce-vue/test/api-client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ describe("$makeCaller", () => {
AxiosClient.defaults.adapter = jest.fn().mockImplementation(async () => <AxiosResponse<any>>{
data: blob,
status: 200,
statusText: "OK",
config: {},
headers: {'content-disposition': "attachment; filename=\"sample-mp4-file small.mp4\"; filename*=UTF-8''sample-mp4-file%20small.mp4"}
})

Expand Down
2 changes: 1 addition & 1 deletion src/coalesce-vue/test/model.display.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe.each(<DisplayData[]>[
{ meta: studentProps.birthDate,
model: "1990-01-02T03:04:05.000-08:00",
// We define the expected using date-fns's format to make this test timezone-independent.
display: format(new Date("1990-01-02T03:04:05.000-08:00"), "M/d/yyyy h:mm:ss aaa") },
display: format(new Date("1990-01-02T03:04:05.000-08:00"), "M/d/yyyy h:mm:ss aa") },
...undisplayable(studentProps.birthDate, true, 123, "abc", {}, [], new Date("!!Invalid") ),

{ meta: studentProps.grade, model: undefined, display: null },
Expand Down

0 comments on commit 161c530

Please sign in to comment.