Skip to content

Commit a2364ac

Browse files
committed
fix(Windows): Debug settings are not persisted across sessions
1 parent 3403510 commit a2364ac

File tree

11 files changed

+500
-160
lines changed

11 files changed

+500
-160
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ jobs:
426426
macos,
427427
macos-template,
428428
windows,
429-
windows-template
429+
windows-template,
430430
]
431431
runs-on: macos-latest
432432
if: "!contains(github.event.head_commit.message, '[skip ci]')"

test/getPackageVersion.test.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// Copyright (c) Microsoft Corporation
3+
//
4+
// This source code is licensed under the MIT license found in the
5+
// LICENSE file in the root directory of this source tree.
6+
//
7+
// @ts-check
8+
9+
describe("getPackageVersion", () => {
10+
const path = require("path");
11+
const { getPackageVersion } = require("../windows/test-app");
12+
13+
const nodeModulesPath = path.join(
14+
__dirname,
15+
"__fixtures__",
16+
"test_app",
17+
"node_modules"
18+
);
19+
20+
test("returns version number for specified package", () => {
21+
const rnPath = path.join(nodeModulesPath, "react-native");
22+
expect(getPackageVersion(rnPath)).toBe("1000.0.0");
23+
24+
const rnCliPath = path.join(
25+
nodeModulesPath,
26+
"@react-native-community",
27+
"cli-platform-ios"
28+
);
29+
expect(getPackageVersion(rnCliPath)).toBe("4.10.1");
30+
});
31+
});

test/getVersionNumber.test.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//
2+
// Copyright (c) Microsoft Corporation
3+
//
4+
// This source code is licensed under the MIT license found in the
5+
// LICENSE file in the root directory of this source tree.
6+
//
7+
// @ts-check
8+
9+
describe("getVersionNumber", () => {
10+
const { getVersionNumber } = require("../windows/test-app");
11+
12+
test("handles arbitrary version number formats", () => {
13+
expect(getVersionNumber("0")).toBe(0);
14+
expect(getVersionNumber("1")).toBe(1);
15+
expect(getVersionNumber("11")).toBe(11);
16+
17+
expect(getVersionNumber("0.0")).toBe(0);
18+
expect(getVersionNumber("0.1")).toBe(1);
19+
expect(getVersionNumber("1.0")).toBe(100);
20+
expect(getVersionNumber("1.1")).toBe(101);
21+
22+
expect(getVersionNumber("0.0.0")).toBe(0);
23+
expect(getVersionNumber("0.0.1")).toBe(1);
24+
expect(getVersionNumber("0.1.0")).toBe(100);
25+
expect(getVersionNumber("0.1.1")).toBe(101);
26+
expect(getVersionNumber("1.0.0")).toBe(10000);
27+
expect(getVersionNumber("1.0.1")).toBe(10001);
28+
expect(getVersionNumber("1.1.0")).toBe(10100);
29+
expect(getVersionNumber("1.1.1")).toBe(10101);
30+
31+
expect(getVersionNumber("0.0.0.0")).toBe(0);
32+
expect(getVersionNumber("0.0.0.1")).toBe(1);
33+
expect(getVersionNumber("0.0.1.0")).toBe(100);
34+
expect(getVersionNumber("0.0.1.1")).toBe(101);
35+
expect(getVersionNumber("0.1.0.0")).toBe(10000);
36+
expect(getVersionNumber("0.1.0.1")).toBe(10001);
37+
expect(getVersionNumber("0.1.1.0")).toBe(10100);
38+
expect(getVersionNumber("0.1.1.1")).toBe(10101);
39+
expect(getVersionNumber("1.0.0.0")).toBe(1000000);
40+
expect(getVersionNumber("1.0.0.1")).toBe(1000001);
41+
expect(getVersionNumber("1.0.1.0")).toBe(1000100);
42+
expect(getVersionNumber("1.0.1.1")).toBe(1000101);
43+
expect(getVersionNumber("1.1.0.0")).toBe(1010000);
44+
expect(getVersionNumber("1.1.0.1")).toBe(1010001);
45+
expect(getVersionNumber("1.1.1.0")).toBe(1010100);
46+
expect(getVersionNumber("1.1.1.1")).toBe(1010101);
47+
});
48+
});

0 commit comments

Comments
 (0)