Skip to content

Commit

Permalink
test(reload): add failing spec for #511
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Mar 13, 2015
1 parent 70c9899 commit 0b48055
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/specs/api/init.reload.multi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"use strict";

var browserSync = require("../../../");

var sinon = require("sinon");
var assert = require("chai").assert;

describe("API: .reload() with multi instances", function () {

var clock, bs1, bs2;

before(function (done) {
browserSync.reset();

bs1 = browserSync.create("Server 1").init({logLevel:"silent"}, function () {
bs2 = browserSync.create("Server 2").init({logLevel: "silent"}, function () {
done();
}).instance;
}).instance;

clock = sinon.useFakeTimers();
});

afterEach(function () {
clock.now = 0;
});

after(function () {
clock.restore();
});

it("should be callable with no args & perform a reload", function () {
assert.doesNotThrow(function () {
browserSync.get("Server 1").reload();
browserSync.get("Server 2").reload();
});
});
});

0 comments on commit 0b48055

Please sign in to comment.