You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return`[Swift-DocC-Render] The render node version for this page has a higher minor version (${current}) than Swift-DocC-Render supports (${CURRENT_SCHEMA_STRING}). Compatibility is not guaranteed.`;
it('emits a warning if the major version is higher than the supported',()=>{
26
-
emitWarningForSchemaVersionMismatch({
26
+
constnewVersion={
27
27
...CURRENT_SUPPORTED_SCHEMA,
28
28
major: CURRENT_SUPPORTED_SCHEMA.major+1,
29
-
});
29
+
};
30
+
emitWarningForSchemaVersionMismatch(newVersion);
30
31
expect(warnSpy).toHaveBeenCalledTimes(1);
31
32
expect(warnSpy)
32
-
.toHaveBeenCalledWith('[Swift-DocC-Render] The render node version for this page (1.1.0) has a different major version component than Swift-DocC-Render supports (0.1.0). Compatibility is not guaranteed.');
33
+
.toHaveBeenCalledWith(`[Swift-DocC-Render] The render node version for this page (${combineVersions(newVersion)}) has a different major version component than Swift-DocC-Render supports (${CURRENT_SCHEMA_STRING}). Compatibility is not guaranteed.`);
33
34
});
34
35
35
36
it('emits a warning if the major version is lower than the supported',()=>{
36
-
emitWarningForSchemaVersionMismatch({
37
+
constnewVersion={
37
38
...CURRENT_SUPPORTED_SCHEMA,
38
39
major: CURRENT_SUPPORTED_SCHEMA.major-1,
39
-
});
40
+
};
41
+
emitWarningForSchemaVersionMismatch(newVersion);
40
42
expect(warnSpy).toHaveBeenCalledTimes(1);
41
43
expect(warnSpy)
42
-
.toHaveBeenCalledWith('[Swift-DocC-Render] The render node version for this page (-1.1.0) has a different major version component than Swift-DocC-Render supports (0.1.0). Compatibility is not guaranteed.');
44
+
.toHaveBeenCalledWith(`[Swift-DocC-Render] The render node version for this page (${combineVersions(newVersion)}) has a different major version component than Swift-DocC-Render supports (${CURRENT_SCHEMA_STRING}). Compatibility is not guaranteed.`);
43
45
});
44
46
45
47
it('emits a warning if the minor version is higher than the supported',()=>{
46
-
emitWarningForSchemaVersionMismatch({
48
+
constnewVersion={
47
49
...CURRENT_SUPPORTED_SCHEMA,
48
50
minor: CURRENT_SUPPORTED_SCHEMA.minor+1,
49
-
});
51
+
};
52
+
emitWarningForSchemaVersionMismatch(newVersion);
50
53
expect(warnSpy).toHaveBeenCalledTimes(1);
51
54
expect(warnSpy)
52
-
.toHaveBeenCalledWith('[Swift-DocC-Render] The render node version for this page has a higher minor version (0.2.0) than Swift-DocC-Render supports (0.1.0). Compatibility is not guaranteed.');
55
+
.toHaveBeenCalledWith(`[Swift-DocC-Render] The render node version for this page has a higher minor version (${combineVersions(newVersion)}) than Swift-DocC-Render supports (${CURRENT_SCHEMA_STRING}). Compatibility is not guaranteed.`);
53
56
});
54
57
55
58
it('does not emit a warning, if the minor version is lower than the supported',()=>{
0 commit comments