replace template_spec test with config_variables test#4034
replace template_spec test with config_variables test#4034KristjanESPERANTO merged 3 commits intoMagicMirrorOrg:developfrom
Conversation
|
I'm not entirely sure, but I think the tests might not properly validate variable substitution? 🤔 The current tests check that
These tests would pass even if substitution was broken. A test for it("config.timeFormat should be 12 from MM_TIME_FORMAT variable", async () => {
expect(config.timeFormat).toBe(12); // default is 24
});This should better verify that substitution works. WDYT? |
|
By the way: I just wanted to say that I'm really excited that we can now hide the secrets from the front end 😃 |
they did. But I changed them now again so they are not testing against defaults. If the variable substitution fails the bash variable remains in the config. Examples: language: "${MM_LANGUAGE}",So here the test will fail because "${MM_LANGUAGE}" not equals "de". timeFormat: ${MM_TIME_FORMAT},Here loading the config would already fail when doing the config check. |
|
Nice solution 👍 🙂 |
|
I have recently noticed problems with github workflow in various repositories. I haven't been able to identify a clear pattern yet. Perhaps Microsoft is making internal changes. |

After introducing new config loading this PR replaces the obsolete template test with a config test.