Update ci.test.js

This commit is contained in:
lowlighter
2021-02-16 14:07:39 +01:00
parent 3d464bfae9
commit d06888f067

View File

@@ -2,6 +2,13 @@
const path = require("path") const path = require("path")
const git = require("simple-git")(path.join(__dirname, "..")) const git = require("simple-git")(path.join(__dirname, ".."))
//Setup
beforeAll(async done => {
//Fetch master
await git.fetch(["origin", "master"])
done()
})
//Check generated files editions //Check generated files editions
const diff = async () => (await git.diff("origin/master...", ["--name-status"])).split("\n").map(x => x.trim()).filter(x => /^M\s+/.test(x)).map(x => x.replace(/^M\s+/, "")) const diff = async () => (await git.diff("origin/master...", ["--name-status"])).split("\n").map(x => x.trim()).filter(x => /^M\s+/.test(x)).map(x => x.replace(/^M\s+/, ""))
describe('Auto-generated files were not modified (use "git checkout @ -- file" if needed)', () => void test.each([ describe('Auto-generated files were not modified (use "git checkout @ -- file" if needed)', () => void test.each([