File: resolverc.test.js

package info (click to toggle)
node-babel-loader 7.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 476 kB
  • sloc: makefile: 8; sh: 2
file content (18 lines) | stat: -rw-r--r-- 585 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import test from "ava";
import path from "path";
import resolveRc from "../lib/resolve-rc";
import fs from "fs";

test("should find the .babelrc file", t => {
  const start = path.join(__dirname, "fixtures/babelrc-test/1/2/3");
  const result = resolveRc(fs, start);

  t.is(result, path.join(__dirname, "fixtures/babelrc-test/.babelrc"));
});

test("should find the package.json babel config", t => {
  const start = path.join(__dirname, "fixtures/package-test");
  const result = resolveRc(fs, start);

  t.is(result, path.join(__dirname, "fixtures/package-test/package.json"));
});