Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
Simplify updating expectations via ENV variable
Browse files Browse the repository at this point in the history
  • Loading branch information
crisptrutski committed Apr 9, 2015
1 parent 8d15a58 commit 02c2255
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions test/sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,17 @@ suite('Source Maps', function() {
test('handles single compilation targets correctly', function(done) {
var module = 'amd-2';
var source = 'traceur.tree.single.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});

test('handles multiple compilation targets correctly', function(done) {
var module = 'first';
var source = 'traceur.tree.multi.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});
Expand All @@ -156,15 +158,17 @@ suite('Source Maps', function() {
test('handles single compilation targets correctly', function(done) {
var module = 'chain/second';
var source = 'traceur.chain.single.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});

test('handles multiple compilation targets correctly', function(done) {
var module = 'chain/first';
var source = 'traceur.chain.multi.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});
Expand All @@ -178,15 +182,17 @@ suite('Source Maps', function() {
test('handles single compilation targets correctly', function(done) {
var module = 'amd-2';
var source = 'babel.tree.single.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});

test('handles multiple compilation targets correctly', function(done) {
var module = 'first';
var source = 'babel.tree.multi.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});
Expand All @@ -196,15 +202,17 @@ suite('Source Maps', function() {
test('handles single compilation targets correctly', function(done) {
var module = 'chain/second';
var source = 'babel.chain.single.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});

test('handles multipl compilation targets correctly', function(done) {
var module = 'chain/first';
var source = 'babel.chain.multi.json';
//writeSourceMaps(module, transpiler, source);
if (process.env.UPDATE_EXPECTATIONS)
writeSourceMaps(module, transpiler, source);
var expected = readExpectation(source);
compareSourceMaps(module, expected, done, transpiler);
});
Expand Down

0 comments on commit 02c2255

Please sign in to comment.