O'Reilly logo

Jasmine JavaScript Testing by Paulo Ragonha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using HTML fixtures

Continuing with the development of the NewInvestmentView component, we can write some basic acceptance criteria:

  • NewInvestmentView should allow the input of the stock symbol
  • NewInvestmentView should allow the input of shares
  • NewInvestmentView should allow the input of the share price

There are many more, but these are a good start.

Create a new spec file for this component, in the new file spec/NewInvestmentViewSpec.js and we can start to translate those specs:

describe("NewInvestmentView", function() {
  it("should allow the input of the stock symbol", function() {
  });

  it("should allow the input of shares", function() {
  });

  it("should allow the input of the share price", function() {
  });
});

But before we can start to implement these, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required