Skip to content

Commit

Permalink
Merge pull request #169 from embroider-build/update-fixturify
Browse files Browse the repository at this point in the history
update fixturify project
  • Loading branch information
mansona authored Nov 25, 2024
2 parents de5ea57 + bb9a1ce commit 9b6b341
Show file tree
Hide file tree
Showing 3 changed files with 1,324 additions and 71 deletions.
22 changes: 11 additions & 11 deletions bin/bin.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import path, { resolve } from 'path';
import Project from 'fixturify-project';
import { Project } from 'fixturify-project';
import { execa } from 'execa';
import ejs from 'ejs';

Expand Down Expand Up @@ -30,10 +30,10 @@ expect.extend({
describe('main binary', function () {
let project;

beforeEach(function () {
beforeEach(async function () {
project = new Project('some-thing-cool', '0.1.0');
project.writeSync();
process.chdir(path.join(project.root, project.name));
await project.write();
process.chdir(project.baseDir);

// ensure an EDITOR is present
process.env.EDITOR = '/bin/whatever';
Expand Down Expand Up @@ -62,7 +62,7 @@ describe('main binary', function () {

it('does not modify if an existing prefix exists in CHANGELOG.md', async function () {
project.files['CHANGELOG.md'] = `# ChangeLog\n\n## v1.2.0\n* Foo bar`;
project.writeSync();
await project.write();

await exec(['--no-install', '--no-label-updates']);

Expand All @@ -74,7 +74,7 @@ describe('main binary', function () {
it('does not modify if an existing prefix exists anywhere on the line and has different casing in CHANGELOG.md', async function () {
project.files['CHANGELOG.md'] =
`# the most mighty CHANgELOG you have ever seen\n\n## v1.2.0\n* Foo bar`;
project.writeSync();
await project.write();

await exec(['--no-install', '--no-label-updates']);

Expand All @@ -100,7 +100,7 @@ describe('main binary', function () {
fetch = +refs/heads/*:refs/remotes/origin/*`,
};

project.writeSync();
await project.write();

await exec(['--no-install', '--no-label-updates']);

Expand Down Expand Up @@ -140,7 +140,7 @@ describe('main binary', function () {

it('does not update devDependencies if release-plan range is greater', async function () {
project.addDevDependency('release-plan', '^999.999.999');
project.writeSync();
await project.write();

await exec(['--no-install', '--no-label-updates']);

Expand Down Expand Up @@ -265,15 +265,15 @@ describe('main binary', function () {
});

describe('RELEASE.md', function () {
beforeEach(() => {
beforeEach(async () => {
project.files['.git'] = {
config: `
[remote "origin"]
url = [email protected]:mansona/create-release-plan-setup.git
fetch = +refs/heads/*:refs/remotes/origin/*`,
};

project.writeSync();
await project.write();
});

function expectedReleaseContents() {
Expand Down Expand Up @@ -309,7 +309,7 @@ describe('main binary', function () {

it('adds a basic header in changelog if prefix does not exist in CHANGELOG.md', async function () {
project.files['CHANGELOG.md'] = `## v1.2.0\n* Foo bar`;
project.writeSync();
await project.write();

await exec(['--no-install', '--no-label-updates']);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-n": "^17.14.0",
"eslint-plugin-prettier": "^5.1.3",
"fixturify-project": "^2.1.1",
"fixturify-project": "^7.1.3",
"prettier": "^3.2.5",
"release-plan": "^0.11.0",
"vitest": "^2.1.5"
Expand Down
Loading

0 comments on commit 9b6b341

Please sign in to comment.