Comparing version 3.24.0 to 3.24.1
{ | ||
"name": "storyblok", | ||
"version": "3.24.0", | ||
"version": "3.24.1", | ||
"description": "A simple CLI to start Storyblok from your command line.", | ||
@@ -22,3 +22,3 @@ "repository": { | ||
"lint:fix": "eslint src/ --fix", | ||
"test": "jest --silent", | ||
"test:unit": "jest --silent", | ||
"test:coverage": "jest --coverage" | ||
@@ -25,0 +25,0 @@ }, |
@@ -22,2 +22,5 @@ const deleteComponents = require('../../src/tasks/delete-components') | ||
}), | ||
getComponents: jest.fn(() => { | ||
return components | ||
}), | ||
delete: jest.fn(() => Promise.resolve()) | ||
@@ -33,5 +36,5 @@ } | ||
const components = FAKE_COMPONENTS() | ||
const spy = jest.spyOn(fs, 'readFileSync').mockReturnValue(JSON.stringify({ | ||
components | ||
})) | ||
const copy = [...components] | ||
copy.splice(2, 1) | ||
const spy = jest.spyOn(fs, 'readFileSync').mockReturnValue(JSON.stringify([...copy])) | ||
const api = { | ||
@@ -43,5 +46,3 @@ get: jest.fn((path) => { | ||
getComponents: jest.fn(() => { | ||
const copy = [...components] | ||
copy.splice(3, 1) | ||
return copy | ||
return components | ||
}), | ||
@@ -48,0 +49,0 @@ delete: jest.fn(() => Promise.resolve()) |
@@ -43,3 +43,3 @@ const fs = require('fs') | ||
const options = { | ||
compFileName: SPACE | ||
fileName: SPACE | ||
} | ||
@@ -75,3 +75,3 @@ | ||
const options = { | ||
space: SPACE | ||
fileName: SPACE | ||
} | ||
@@ -113,3 +113,3 @@ | ||
const options = { | ||
space: SPACE, | ||
fileName: SPACE, | ||
separateFiles: true | ||
@@ -123,3 +123,3 @@ } | ||
for (const comp in FAKE_COMPONENTS()) { | ||
const compFileName = `${FAKE_COMPONENTS()[comp].name}-${SPACE}.json` | ||
const fileName = `${FAKE_COMPONENTS()[comp].name}-${SPACE}.json` | ||
let data = FAKE_COMPONENTS()[comp] | ||
@@ -132,3 +132,3 @@ const [compPath, compData] = fs.writeFile.mock.calls[comp] | ||
expect(compPath).toBe(`./${compFileName}`) | ||
expect(compPath).toBe(`./${fileName}`) | ||
expect(JSON.parse(compData)).toEqual(data) | ||
@@ -135,0 +135,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
216708
66
5800