Skip to content

Commit 969b541

Browse files
added test cases for version check (#514)
* added test cases for version check Signed-off-by: Salman khan <[email protected]> * fixed es-lint issue Signed-off-by: Salman khan <[email protected]> * fixed es-lint issue Signed-off-by: Salman khan <[email protected]> * added the resolveJsonModule in ts config Signed-off-by: Salman khan <[email protected]> * made the requested changes Signed-off-by: Salman khan <[email protected]> --------- Signed-off-by: Salman khan <[email protected]>
1 parent d20b7dd commit 969b541

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

test/unit/version/version.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Copyright 2023 The Dapr Authors
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
14+
import packageJson from "../../../package.json";
15+
import packageLockJson from "../../../package-lock.json";
16+
describe("versions", () => {
17+
it("should have the same JS-SDK version in package.json and package-lock.json", () => {
18+
const sdkVersionInPackageJSon = packageJson.version;
19+
const sdkVersionInPackageLockJSon = packageLockJson.version;
20+
expect(sdkVersionInPackageJSon).toEqual(sdkVersionInPackageLockJSon);
21+
});
22+
});

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/* Visit https://aka.ms/tsconfig.json to read more about this file */
44
/* Basic Options */
55
// "incremental": true, /* Enable incremental compilation */
6+
"resolveJsonModule": true,
67
"target": "es2015" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */,
78
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
89
"lib": [] /* Specify library files to be included in the compilation. */,

0 commit comments

Comments
 (0)