@@ -1,10 +1,10 @@
|
||||
describe('toHaveBeenCalledBefore', function() {
|
||||
it('throws an exception when the actual is not a spy', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore({
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore({
|
||||
pp: privateUnderTest.makePrettyPrinter()
|
||||
}),
|
||||
fn = function() {},
|
||||
spy = new jasmineUnderTest.Env().createSpy('a spy');
|
||||
spy = new privateUnderTest.Env().createSpy('a spy');
|
||||
|
||||
expect(function() {
|
||||
matcher.compare(fn, spy);
|
||||
@@ -12,10 +12,10 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('throws an exception when the expected is not a spy', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore({
|
||||
pp: jasmineUnderTest.makePrettyPrinter()
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore({
|
||||
pp: privateUnderTest.makePrettyPrinter()
|
||||
}),
|
||||
spy = new jasmineUnderTest.Env().createSpy('a spy'),
|
||||
spy = new privateUnderTest.Env().createSpy('a spy'),
|
||||
fn = function() {};
|
||||
|
||||
expect(function() {
|
||||
@@ -24,9 +24,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('fails when the actual was not called', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
secondSpy();
|
||||
|
||||
@@ -38,9 +38,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('fails when the expected was not called', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
firstSpy();
|
||||
|
||||
@@ -52,9 +52,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('fails when the actual is called after the expected', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
secondSpy();
|
||||
firstSpy();
|
||||
@@ -67,9 +67,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('fails when the actual is called before and after the expected', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
firstSpy();
|
||||
secondSpy();
|
||||
@@ -83,9 +83,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('fails when the expected is called before and after the actual', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
secondSpy();
|
||||
firstSpy();
|
||||
@@ -99,9 +99,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('passes when the actual is called before the expected', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
firstSpy();
|
||||
secondSpy();
|
||||
@@ -114,9 +114,9 @@ describe('toHaveBeenCalledBefore', function() {
|
||||
});
|
||||
|
||||
it('set the correct calls as verified when passing', function() {
|
||||
const matcher = jasmineUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new jasmineUnderTest.Spy('first spy'),
|
||||
secondSpy = new jasmineUnderTest.Spy('second spy');
|
||||
const matcher = privateUnderTest.matchers.toHaveBeenCalledBefore(),
|
||||
firstSpy = new privateUnderTest.Spy('first spy'),
|
||||
secondSpy = new privateUnderTest.Spy('second spy');
|
||||
|
||||
firstSpy();
|
||||
secondSpy();
|
||||
|
||||
Reference in New Issue
Block a user