Rename j$ to jasmineUnderTest for specs

- Clarifies what it is for when writing tests
- No longer named the same as the `jasmine` that is injected into live
  code
This commit is contained in:
Gregg Van Hove
2015-12-03 17:23:32 -08:00
parent a95c2cfe3f
commit 79206ccff5
60 changed files with 702 additions and 896 deletions

View File

@@ -1,43 +1,43 @@
describe("Anything", function() {
it("matches a string", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch('foo')).toBe(true);
});
it("matches a number", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(42)).toBe(true);
});
it("matches an object", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch({ foo: 'bar' })).toBe(true);
});
it("matches an array", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch([1,2,3])).toBe(true);
});
it("doesn't match undefined", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch()).toBe(false);
expect(anything.asymmetricMatch(undefined)).toBe(false);
});
it("doesn't match null", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(null)).toBe(false);
});
it("jasmineToString's itself", function() {
var anything = new j$.Anything();
var anything = new jasmineUnderTest.Anything();
expect(anything.jasmineToString()).toEqual("<jasmine.anything>");
});