forked from mebjas/html5-qrcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexperimental-features.test.ts
More file actions
23 lines (19 loc) · 976 Bytes
/
experimental-features.test.ts
File metadata and controls
23 lines (19 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { expect } from "chai";
import {
ExperimentalFeaturesConfig,
ExperimentalFeaturesConfigFactory
} from "../src/experimental-features";
describe("ExperimentalFeaturesConfigFactory class", () => {
it("empty config, sets experimental feature to false", () => {
let featureConfig = ExperimentalFeaturesConfigFactory.createExperimentalFeaturesConfig();
expect(featureConfig.useBarCodeDetectorIfSupported).to.be.false;
});
it("non empty config, delegates the right config", () => {
let featureConfig = ExperimentalFeaturesConfigFactory.createExperimentalFeaturesConfig(
{ useBarCodeDetectorIfSupported: false });
expect(featureConfig.useBarCodeDetectorIfSupported).to.be.false;
featureConfig = ExperimentalFeaturesConfigFactory.createExperimentalFeaturesConfig(
{ useBarCodeDetectorIfSupported: true });
expect(featureConfig.useBarCodeDetectorIfSupported).to.be.true;
});
});