We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I tried to get karma, jasmine working. But when i run the tests. I get to following error
PhantomJS 2.1.1 (Windows 8 0.0.0) TestSuite firstTest FAILED ReferenceError: Can't find variable: example in test/specs/index.spec.js (line 10) test/specs/index.spec.js:10:21 loaded@http://localhost:9876/context.js:162:17 TypeError: undefined is not an object (evaluating 'b.init') in test/specs/index.spec.js (line 22)
my sources look like this:
var example = { exampleFunction: a => [1, 2, 3].map(n => n ** a) }
And the spec is the following:
describe("TestSuite", function() { var a, b, c; beforeEach(function() { a = 1; b = new example; c = b.exampleFunction(a); spyOn(b, 'init').andCallThrough(); }); afterEach(function() { a = 0; b = {}; c = []; }); it("firstTest", function() { expect(b.init).toBeDefined(); expect(c).toBe([1, 2, 3]); }); it("secondTest", function() { expect(2).toEqual(4); }); it("thirdTest", function() { expect(c).toContain(1); expect(c).toContain(2); expect(c).toContain(4); }); });
Can anybody help me and tell me where the problem is?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried to get karma, jasmine working. But when i run the tests. I get to following error
my sources look like this:
And the spec is the following:
Can anybody help me and tell me where the problem is?
The text was updated successfully, but these errors were encountered: