()
| 147 | write(devicesFile, contentDevices); |
| 148 | |
| 149 | const writeAndCheck = (): void => { |
| 150 | expect(settings.write()); // trigger writing of ENVs |
| 151 | expect(settings.validate()).toStrictEqual([]); |
| 152 | expect(settings.get()).toStrictEqual(expected); |
| 153 | |
| 154 | settings.set(["advanced", "channel"], 25); |
| 155 | expect(settings.get().advanced.channel).toStrictEqual(15); |
| 156 | expect(read(configurationFile)).toMatchObject({advanced: {channel: 15}}); |
| 157 | |
| 158 | expect(read(secretFile)).toMatchObject({password: "the-password"}); |
| 159 | expect(read(configurationFile)).toHaveProperty("mqtt.password", "!secret.yaml password"); |
| 160 | }; |
| 161 | |
| 162 | // Write trice to ensure there are no side effects. |
| 163 | writeAndCheck(); |
no test coverage detected