UNPKG

1.13 kBJavaScriptView Raw
1"use strict";
2/**
3 * @license
4 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
5 * This code may only be used under the BSD style license found at
6 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
7 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
8 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
9 * Google as part of the polymer project is also subject to an additional IP
10 * rights grant found at http://polymer.github.io/PATENTS.txt
11 */
12Object.defineProperty(exports, "__esModule", { value: true });
13const chai_1 = require("chai");
14const token_1 = require("../shady-css/token");
15describe('Token', () => {
16 it('supports bitfield type comparison', () => {
17 const token = new token_1.Token(128 | 32 | 2, 0, 0);
18 chai_1.expect(token.is(2)).to.be.ok;
19 chai_1.expect(token.is(4)).to.not.be.ok;
20 chai_1.expect(token.is(32 | 2)).to.be.ok;
21 chai_1.expect(token.is(4 | 64)).to.not.be.ok;
22 chai_1.expect(token.is(128)).to.be.ok;
23 });
24});
25//# sourceMappingURL=token-test.js.map
\No newline at end of file