##// END OF EJS Templates
Merged in propose cancellations (pull request #1)...
Merged in propose cancellations (pull request #1) Propose cancellations Approved-by: m407 <bitbucket@m407.ru>

File last commit:

r11:b9900835d201 propose cancellat...
r21:dd8f8dfcd934 merge default
Show More
trace-test.js
28 lines | 971 B | application/javascript | JavascriptLexer
define(["tape"], function(tape) {
"use strict";
var sourceId = '73a633f3-eab8-49b0-8601-07cae710f234';
var sourceId2 = '3ba9c7cd-ed77-437b-9a2f-1cbeb1226b5b';
tape('Load TraceSource for the module', function(t) {
require(["core/log/trace!" + sourceId, "core/log/TraceSource"], function(trace, TraceSource) {
t.equal(trace && trace.id, sourceId, "trace should be taken from the loader plugin parameter");
var count = 0;
var h = TraceSource.on(function(x) {
if(x.id == sourceId || x.id == sourceId2)
count++;
});
t.equal(count, 1, "should see created channel immediatelly");
t.equal(trace, TraceSource.get(sourceId), "should get same TraceSource from registry");
t.equal(count, 1);
TraceSource.get(sourceId2);
t.equal(count, 2);
h.destroy();
t.end();
});
});
});