mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Use fs.md5ForPath in spec-helpert o ensure sample.js isn't modified
This commit is contained in:
@@ -154,18 +154,5 @@ $.fn.textInput = (data) ->
|
||||
$.fn.simulateDomAttachment = ->
|
||||
$('<html>').append(this)
|
||||
|
||||
throw "Sample.js is modified" unless fs.read(require.resolve('fixtures/sample.js')) == """
|
||||
var quicksort = function () {
|
||||
var sort = function(items) {
|
||||
if (items.length <= 1) return items;
|
||||
var pivot = items.shift(), current, left = [], right = [];
|
||||
while(items.length > 0) {
|
||||
current = items.shift();
|
||||
current < pivot ? left.push(current) : right.push(current);
|
||||
}
|
||||
return sort(left).concat(pivot).concat(sort(right));
|
||||
};
|
||||
|
||||
return sort(Array.apply(this, arguments));
|
||||
};
|
||||
"""
|
||||
unless fs.md5ForPath(require.resolve('fixtures/sample.js')) == "dd38087d0d7e3e4802a6d3f9b9745f2b"
|
||||
throw "Sample.js is modified"
|
||||
|
||||
Reference in New Issue
Block a user