Sha256: 60e0325ab44d279887e588af6c0717962fc5057c4161b343e96c5aa0b3083997
Contents?: true
Size: 610 Bytes
Versions: 69
Compression:
Stored size: 610 Bytes
Contents
'use strict'; /*jshint asi: true*/ var test = require('tap').test , util = require('util') , redeyed = require('..') function inspect (obj) { return util.inspect(obj, false, 5, true) } test('removes shebang from the code before parsing it', function (t) { var code = [ '#!/usr/bin/env node' , 'var util = require("util");' ].join('\n') , opts = { Keyword: { 'var': '%:^' } } , expected = '\n%var^ util = require("util");' , res = redeyed(code, opts).code t.equals(res, expected, inspect(code) + ' opts: ' + inspect(opts) + ' => ' + inspect(expected)) t.end() })
Version data entries
69 entries across 69 versions & 2 rubygems