I have setup Jasmine to run my tests in JS. The tests runs and works in Specrunner but I want to use jasmine in my command line to run the tests but I get
1) Account Account balance to be 0
Message:
ReferenceError: Account is not defined
Stack:
ReferenceError: Account is not defined
at UserContext.<anonymous> (/Users/student/Projects/week_9/tech_tests/bank_tech_test/spec/AccountSpec.js:4:27)
at <Jasmine>
at processImmediate (internal/timers.js:456:21)
1 spec, 1 failure
Finished in 0.01 seconds
I have the class Account in my src and it can pass when running the Specrunner.html. Here is my test:
describe("Account", function(){
describe("Account balance", function(){
it("to be 0", function(){
let account = new Account
expect(account.balance).toBe(0)
})
})
})
Am I missing something from my setup of Jasmine?
EDIT: Added account code and file paths
class Account{
constructor(){
this.balance = 0
}
}
my Account.js file path is src/Account.js. my AccountSpec.js path is spec/AccountSpec.js