mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 07:35:52 +00:00
committed by
Mayukha Vadari
parent
8c5bc22317
commit
e200de3073
@@ -1,30 +1,30 @@
|
||||
import { assert } from "chai";
|
||||
import { assert } from 'chai'
|
||||
|
||||
import { isFlagEnabled } from "../../src/models/utils";
|
||||
import { isFlagEnabled } from '../../src/models/utils'
|
||||
|
||||
/**
|
||||
* Utils Testing.
|
||||
*
|
||||
* Provides tests for utils used in models.
|
||||
*/
|
||||
describe("Models Utils", function () {
|
||||
describe("isFlagEnabled", function () {
|
||||
let flags: number;
|
||||
const flag1 = 0x00010000;
|
||||
const flag2 = 0x00020000;
|
||||
describe('Models Utils', function () {
|
||||
describe('isFlagEnabled', function () {
|
||||
let flags: number
|
||||
const flag1 = 0x00010000
|
||||
const flag2 = 0x00020000
|
||||
|
||||
beforeEach(function () {
|
||||
flags = 0x00000000;
|
||||
});
|
||||
flags = 0x00000000
|
||||
})
|
||||
|
||||
it("verifies a flag is enabled", function () {
|
||||
flags += flag1 + flag2;
|
||||
assert.isTrue(isFlagEnabled(flags, flag1));
|
||||
});
|
||||
it('verifies a flag is enabled', function () {
|
||||
flags += flag1 + flag2
|
||||
assert.isTrue(isFlagEnabled(flags, flag1))
|
||||
})
|
||||
|
||||
it("verifies a flag is not enabled", function () {
|
||||
flags += flag2;
|
||||
assert.isFalse(isFlagEnabled(flags, flag1));
|
||||
});
|
||||
});
|
||||
});
|
||||
it('verifies a flag is not enabled', function () {
|
||||
flags += flag2
|
||||
assert.isFalse(isFlagEnabled(flags, flag1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user