Sha256: 66db7a5a9e38755718b7632c7316462655940ae3977029ff8ebf228303ce6ed1
Contents?: true
Size: 656 Bytes
Versions: 1
Compression:
Stored size: 656 Bytes
Contents
require 'spec_helper' require 'opal/source_map' describe Opal::SourceMap do before { get '/assets/source_map_example.js' } let(:map_body) do get response.headers['X-SourceMap'] response.body end let(:map) { JSON.parse(map_body) } it 'has the source map header' do expect(response.headers['X-SourceMap']).to be_present end it "the map is a valid json" do %w[sources mappings].each do |key| expect(map_body[key]).to be_present end end it "points to a file on the disk" do path = map['sources'].first pathname = Pathname(path.gsub(%r{^file\://}, '')) expect(pathname.exist?).to be_true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opal-rails-0.5.2 | spec/integration/source_map_spec.rb |