Skip to content

Commit afbd603

Browse files
committed
fix space problem and add unique name log check to integration tests
1 parent 1e5b436 commit afbd603

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/feature-toggles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ class FeatureToggles {
860860
logger.info(
861861
[
862862
"finished initialization",
863-
...(this.__uniqueName ? [` of "${this.__uniqueName}"`] : []),
863+
...(this.__uniqueName ? [`of "${this.__uniqueName}"`] : []),
864864
util.format(
865865
"with %i feature toggle%s (%i runtime, %i file, %i auto)",
866866
totalCount,

test/integration-local/feature-toggles.integration.test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ let toggles;
2020

2121
describe("local integration test", () => {
2222
beforeEach(async () => {
23+
process.env.BTP_FEATURES_UNIQUE_NAME = "unicorn";
2324
jest.resetModules();
2425
toggles = require("../../src/");
2526

@@ -141,7 +142,7 @@ describe("local integration test", () => {
141142
expect(featureTogglesLoggerSpy.info.mock.calls).toMatchInlineSnapshot(`
142143
[
143144
[
144-
"finished initialization with 4 feature toggles (2 runtime, 1 file, 1 auto) using NO_REDIS",
145+
"finished initialization of "unicorn" with 4 feature toggles (2 runtime, 1 file, 1 auto) using NO_REDIS",
145146
],
146147
]
147148
`);
@@ -285,7 +286,7 @@ describe("local integration test", () => {
285286
expect(featureTogglesLoggerSpy.info.mock.calls).toMatchInlineSnapshot(`
286287
[
287288
[
288-
"finished initialization with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
289+
"finished initialization of "unicorn" with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
289290
],
290291
]
291292
`);
@@ -315,7 +316,7 @@ describe("local integration test", () => {
315316
expect(featureTogglesLoggerSpy.info.mock.calls).toMatchInlineSnapshot(`
316317
[
317318
[
318-
"finished initialization with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
319+
"finished initialization of "unicorn" with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
319320
],
320321
]
321322
`);
@@ -452,7 +453,7 @@ describe("local integration test", () => {
452453
expect(featureTogglesLoggerSpy.info.mock.calls).toMatchInlineSnapshot(`
453454
[
454455
[
455-
"finished initialization with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
456+
"finished initialization of "unicorn" with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
456457
],
457458
]
458459
`);
@@ -549,7 +550,7 @@ describe("local integration test", () => {
549550
expect(featureTogglesLoggerSpy.info.mock.calls).toMatchInlineSnapshot(`
550551
[
551552
[
552-
"finished initialization with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
553+
"finished initialization of "unicorn" with 9 feature toggles (9 runtime, 0 file, 0 auto) using NO_REDIS",
553554
],
554555
]
555556
`);

0 commit comments

Comments
 (0)