LoginSignup
2
2

More than 5 years have passed since last update.

Jasmineのテスト内で画像を表示する

Last updated at Posted at 2012-12-26

「public」フォルダに画像ファイルを置く。

describe "Sample Image", ->
  sampleImage = undefined
  beforeEach ->
    sampleImage = new Image
    sampleImage.src = "public/sample11.jpg"

  it "should be defined", ->
    $(sampleImage).appendTo('body')
    expect(sampleImage).toBeDefined()

これでテストページの末尾に画像が表示される


ブログやってます:PAPA-tronix !

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2