Skip to content

Commit

Permalink
fix(ignore): Fix _colorTempRangeProvided added to exposes when runn…
Browse files Browse the repository at this point in the history
…ing in Jest tests
  • Loading branch information
Koenkk committed Jul 23, 2024
1 parent 6a37933 commit 444910e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/exposes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export class Light extends Base {
.withValueMax(range[1])
.withDescription('Color temperature of this light');

if (process.env.JEST_WORKER_ID) {
if (process.env.ZHC_TEST) {
// @ts-ignore
feature._colorTempRangeProvided = rangeProvided;
}
Expand Down
2 changes: 2 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const process = require('process');
process.env['ZHC_TEST'] = true;
const index = require('../src/index');
const exposes = require('../src/lib/exposes');
const utils = require('../src/lib/utils');
Expand Down

0 comments on commit 444910e

Please sign in to comment.