Sha256: 91dbd63fef9f77d2e8ee1d9405ac53089d7e1b88e251d9f7295983b3395a4166

Contents?: true

Size: 586 Bytes

Versions: 20

Compression:

Stored size: 586 Bytes

Contents

require "spec_helper"

describe Wrapper do
  before(:each) do
    @name = "app"
    @script = 'module.exports = function() {return console.log("log from app!");};'
    @expected_script = <<-DEFINITIONS
this.require.define({"app":function(exports, require, module){module.exports = function() {return console.log("log from app!");};;}});
DEFINITIONS
  end

  it "should wrapped by wrapper" do
    script = Wrapper::Module.wrap(@name, @script)
    expect(script).to eq @expected_script
  end

  it "should has definition" do
    expect(Wrapper::Module.definition).not_to be_nil
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
linner-hc-1.0.0 spec/linner/wrapper_spec.rb
linner-0.12.0 spec/linner/wrapper_spec.rb
linner-0.11.6 spec/linner/wrapper_spec.rb
linner-0.11.5 spec/linner/wrapper_spec.rb
linner-0.11.4 spec/linner/wrapper_spec.rb
linner-0.11.3 spec/linner/wrapper_spec.rb
linner-0.11.2 spec/linner/wrapper_spec.rb
linner-0.11.1 spec/linner/wrapper_spec.rb
linner-0.11.0 spec/linner/wrapper_spec.rb
linner-0.10.0 spec/linner/wrapper_spec.rb
linner-0.9.1 spec/linner/wrapper_spec.rb
linner-0.9.0 spec/linner/wrapper_spec.rb
linner-0.8.7 spec/linner/wrapper_spec.rb
linner-0.8.6 spec/linner/wrapper_spec.rb
linner-0.8.5 spec/linner/wrapper_spec.rb
linner-0.8.4 spec/linner/wrapper_spec.rb
linner-0.8.3 spec/linner/wrapper_spec.rb
linner-0.8.2 spec/linner/wrapper_spec.rb
linner-0.8.1 spec/linner/wrapper_spec.rb
linner-0.8.0 spec/linner/wrapper_spec.rb