Skip to content

Commit

Permalink
[FIX] improve wording in generateFlexChangesBundle
Browse files Browse the repository at this point in the history
The language check kindly pointed out some words to improve. With this commit the proposals of the check are applied.
  • Loading branch information
Lonwyr committed Apr 9, 2024
1 parent c816e33 commit ea5d00c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/lib/tasks/bundlers/generateFlexChangesBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from "sinon";
import generateFlexChangesBundle from "../../../../lib/tasks/bundlers/generateFlexChangesBundle.js";


function createDummyResource(content) {
function createPlaceholderResource(content) {
return {
name: "file",
getBuffer: async () => JSON.stringify(content),
Expand All @@ -12,14 +12,14 @@ function createDummyResource(content) {
};
}

function createDummyWorkspace(changes, manifest, flexBundle) {
function createPlaceholderWorkspace(changes, manifest, flexBundle) {
return {
byGlob: async (path) => changes.map(createDummyResource),
byGlob: async (path) => changes.map(createPlaceholderResource),
byPath: async (path) => {
if ( path.includes("manifest.json") ) {
return createDummyResource(manifest);
return createPlaceholderResource(manifest);
} else if ( path.includes("flexibility-bundle.json")) {
return createDummyResource(flexBundle);
return createPlaceholderResource(flexBundle);
}
},
write: () => {
Expand Down Expand Up @@ -136,10 +136,10 @@ function createDummyWorkspace(changes, manifest, flexBundle) {
"variants": []
};

const dummyWorkspace = createDummyWorkspace(changeList, manifest, flexBundle);
const stub = sinon.stub(dummyWorkspace, "write").returnsArg(0);
const placeholderWorkspace = createPlaceholderWorkspace(changeList, manifest, flexBundle);
const stub = sinon.stub(placeholderWorkspace, "write").returnsArg(0);
await generateFlexChangesBundle({
workspace: dummyWorkspace,
workspace: placeholderWorkspace,
taskUtil: false,
options: {
namespace: "/mypath"
Expand Down Expand Up @@ -214,11 +214,11 @@ function createDummyWorkspace(changes, manifest, flexBundle) {
"variants": []
};

const dummyWorkspace = createDummyWorkspace(changeList, manifest, flexBundle);
const stub = sinon.stub(dummyWorkspace, "write").returnsArg(0);
const placeholderWorkspace = createPlaceholderWorkspace(changeList, manifest, flexBundle);
const stub = sinon.stub(placeholderWorkspace, "write").returnsArg(0);

await generateFlexChangesBundle({
workspace: dummyWorkspace,
workspace: placeholderWorkspace,
taskUtil: false,
options: {
namespace: "/mypath"
Expand Down

0 comments on commit ea5d00c

Please sign in to comment.