Skip to content

Commit

Permalink
new api - wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hpruszyn committed Jul 7, 2024
1 parent 931bdf3 commit 2fee95a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 184 deletions.
171 changes: 0 additions & 171 deletions tests/MockPlatform.ts

This file was deleted.

14 changes: 1 addition & 13 deletions tests/devices.test.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
import {MockAccessory, MockPlatform} from './MockPlatform';
import {Data} from '../src/nibe/myuplink/nibe-dto';

import * as fs from 'fs';
import * as path from 'path';
import {Data} from '../src/platform/DataDomain';

const loadData = function (product) {
return JSON.parse(fs.readFileSync(path.resolve(__dirname, `./data/${product.replace(/ /g, '-')}.json`), 'utf8'));
};

describe('Tests for not existing product', () => {
const product = 'XXX';
const data = loadData(product) as Data;
const platform = new MockPlatform();
platform.test(data);
test('not supported device should not have accessories', () => {
expect(platform.getAccessories().length).toBe(0);
});
});

const outdoorTemperature = function (currentTemp, serialNumber, index = 0) {
return {
id: `nibe-outdoor-temperature-${index === 0 ? 40004 : 44362}-${index}`, tests: [
Expand Down

0 comments on commit 2fee95a

Please sign in to comment.