1 | ;
|
2 | // *****************************************************************************
|
3 | // Copyright (C) 2018 Ericsson and others.
|
4 | //
|
5 | // This program and the accompanying materials are made available under the
|
6 | // terms of the Eclipse Public License v. 2.0 which is available at
|
7 | // http://www.eclipse.org/legal/epl-2.0.
|
8 | //
|
9 | // This Source Code may also be made available under the following Secondary
|
10 | // Licenses when the conditions for such availability set forth in the Eclipse
|
11 | // Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
12 | // with the GNU Classpath Exception which is available at
|
13 | // https://www.gnu.org/software/classpath/license.html.
|
14 | //
|
15 | // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
16 | // *****************************************************************************
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | const chai_1 = require("chai");
|
19 | const event_1 = require("./event");
|
20 | describe('Event Objects', () => {
|
21 | it('Emitter firing should be synchronous', () => {
|
22 | const emitter = new event_1.Emitter();
|
23 | let counter = 0;
|
24 | emitter.event(() => counter++);
|
25 | (0, chai_1.expect)(counter).eq(0);
|
26 | emitter.fire(undefined);
|
27 | (0, chai_1.expect)(counter).eq(1);
|
28 | });
|
29 | });
|
30 | //# sourceMappingURL=event.spec.js.map |
\ | No newline at end of file |