import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
import test from 'ava';
import normalize from './normalize';
var cases = [{
  input: [],
  output: ''
}, {
  input: ['dir', 'file.js'],
  output: 'dir/file.js'
}, {
  input: ['dir/caller.js', '../', './called.js'],
  output: 'dir/called.js'
}, {
  input: ['./rel/caller.js', '../', '/abs.js'],
  output: 'rel/abs.js'
}, {
  input: ['/extra/./pathes//.////.////caller.js', '../', '//.///./called.js'],
  output: 'extra/pathes/called.js'
}];
test('normalize file path', function (t) {
  for (var _i = 0; _i < cases.length; _i++) {
    var _cases$_i = cases[_i],
        input = _cases$_i.input,
        output = _cases$_i.output;
    t.is(normalize.apply(void 0, _toConsumableArray(input)), output);
  }
});