Skip to content

Commit 928682b

Browse files
Test more precise
1 parent ffe4cf0 commit 928682b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/launcher/util/appCompatibilityWarning.test.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import appCompatibilityWarning, {
1818
const requiringEngine = (engineVersion?: string): LaunchableApp =>
1919
createDownloadableTestApp(undefined, { engineVersion });
2020

21-
const failingCheck = {
21+
const failingCheck = (warning: string) => ({
2222
isDecided: true,
2323
isCompatible: false,
24-
warning: expect.anything(),
24+
warning,
2525
longWarning: expect.anything(),
26-
};
26+
});
2727

2828
const undecidedCheck = {
2929
isDecided: false,
@@ -52,7 +52,11 @@ describe('check compatibility of an app with the launcher', () => {
5252
requiringEngine(undefined),
5353
'irrelevant'
5454
)
55-
).toMatchObject(failingCheck);
55+
).toMatchObject(
56+
failingCheck(
57+
'The app does not specify which nRF Connect for Desktop versions it supports'
58+
)
59+
);
5660
});
5761

5862
it('is undecided if any engine version is set', () => {
@@ -93,7 +97,11 @@ describe('check compatibility of an app with the launcher', () => {
9397
it('fails if the app requires a higher version', () => {
9498
expect(
9599
checkEngineIsSupported(requiringEngine('^2.0.0'), '1.2.3')
96-
).toMatchObject(failingCheck);
100+
).toMatchObject(
101+
failingCheck(
102+
'The app only supports nRF Connect for Desktop ^2.0.0, which does not match your currently installed version'
103+
)
104+
);
97105
});
98106
});
99107

0 commit comments

Comments
 (0)