Run Prettier on all files
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
describe("toThrow", function() {
|
||||
|
||||
it("throws an error when the actual is not a function", function() {
|
||||
describe('toThrow', function() {
|
||||
it('throws an error when the actual is not a function', function() {
|
||||
var matcher = jasmineUnderTest.matchers.toThrow();
|
||||
|
||||
expect(function() {
|
||||
@@ -9,7 +8,7 @@ describe("toThrow", function() {
|
||||
}).toThrowError(/Actual is not a Function/);
|
||||
});
|
||||
|
||||
it("fails if actual does not throw", function() {
|
||||
it('fails if actual does not throw', function() {
|
||||
var matcher = jasmineUnderTest.matchers.toThrow(),
|
||||
fn = function() {
|
||||
return true;
|
||||
@@ -19,10 +18,10 @@ describe("toThrow", function() {
|
||||
result = matcher.compare(fn);
|
||||
|
||||
expect(result.pass).toBe(false);
|
||||
expect(result.message).toEqual("Expected function to throw an exception.");
|
||||
expect(result.message).toEqual('Expected function to throw an exception.');
|
||||
});
|
||||
|
||||
it("passes if it throws but there is no expected", function() {
|
||||
it('passes if it throws but there is no expected', function() {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(true),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
@@ -36,10 +35,12 @@ describe("toThrow", function() {
|
||||
result = matcher.compare(fn);
|
||||
|
||||
expect(result.pass).toBe(true);
|
||||
expect(result.message()).toEqual("Expected function not to throw, but it threw 5.");
|
||||
expect(result.message()).toEqual(
|
||||
'Expected function not to throw, but it threw 5.'
|
||||
);
|
||||
});
|
||||
|
||||
it("passes even if what is thrown is falsy", function() {
|
||||
it('passes even if what is thrown is falsy', function() {
|
||||
var matcher = jasmineUnderTest.matchers.toThrow({
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
}),
|
||||
@@ -50,10 +51,12 @@ describe("toThrow", function() {
|
||||
|
||||
result = matcher.compare(fn);
|
||||
expect(result.pass).toBe(true);
|
||||
expect(result.message()).toEqual("Expected function not to throw, but it threw undefined.");
|
||||
expect(result.message()).toEqual(
|
||||
'Expected function not to throw, but it threw undefined.'
|
||||
);
|
||||
});
|
||||
|
||||
it("passes if what is thrown is equivalent to what is expected", function() {
|
||||
it('passes if what is thrown is equivalent to what is expected', function() {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(true),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
@@ -67,10 +70,10 @@ describe("toThrow", function() {
|
||||
result = matcher.compare(fn, 5);
|
||||
|
||||
expect(result.pass).toBe(true);
|
||||
expect(result.message()).toEqual("Expected function not to throw 5.");
|
||||
expect(result.message()).toEqual('Expected function not to throw 5.');
|
||||
});
|
||||
|
||||
it("fails if what is thrown is not equivalent to what is expected", function() {
|
||||
it('fails if what is thrown is not equivalent to what is expected', function() {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(false),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
@@ -81,13 +84,15 @@ describe("toThrow", function() {
|
||||
},
|
||||
result;
|
||||
|
||||
result = matcher.compare(fn, "foo");
|
||||
result = matcher.compare(fn, 'foo');
|
||||
|
||||
expect(result.pass).toBe(false);
|
||||
expect(result.message()).toEqual("Expected function to throw 'foo', but it threw 5.");
|
||||
expect(result.message()).toEqual(
|
||||
"Expected function to throw 'foo', but it threw 5."
|
||||
);
|
||||
});
|
||||
|
||||
it("fails if what is thrown is not equivalent to undefined", function() {
|
||||
it('fails if what is thrown is not equivalent to undefined', function() {
|
||||
var matchersUtil = {
|
||||
equals: jasmine.createSpy('delegated-equal').and.returnValue(false),
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
@@ -101,6 +106,8 @@ describe("toThrow", function() {
|
||||
result = matcher.compare(fn, void 0);
|
||||
|
||||
expect(result.pass).toBe(false);
|
||||
expect(result.message()).toEqual("Expected function to throw undefined, but it threw 5.");
|
||||
expect(result.message()).toEqual(
|
||||
'Expected function to throw undefined, but it threw 5.'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user