create-slate-theme
Advanced tools
Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8
const fs = require('fs-extra'); | ||
const execa = require('execa'); | ||
const mockFunction = jest.fn(); | ||
const mockFunction = jest.fn(() => { | ||
return Promise.resolve(); | ||
}); | ||
@@ -6,0 +8,0 @@ module.exports = function(file, args, options) { |
@@ -60,2 +60,9 @@ const fs = jest.genMockFromModule('fs-extra'); | ||
function mkdirp(dir) { | ||
return new Promise((resolve) => { | ||
__mockFiles[path.resolve(dir)] = __mockFiles[path.resolve(dir)] || []; | ||
resolve(); | ||
}); | ||
} | ||
process.__chdir = process.chdir; | ||
@@ -71,3 +78,4 @@ process.chdir = chdir; | ||
fs.remove = remove; | ||
fs.mkdirp = mkdirp; | ||
module.exports = fs; |
@@ -8,3 +8,3 @@ const hostedGitInfo = jest.genMockFromModule('hosted-git-info'); | ||
project: 'test-repo', | ||
git() { | ||
ssh() { | ||
return 'git@github.com:shopify/test-repo.git'; | ||
@@ -11,0 +11,0 @@ }, |
@@ -48,5 +48,5 @@ const fs = require('fs-extra'); | ||
test('throws an error when copying from a local directory that does not exist', async () => { | ||
await expect( | ||
createSlateTheme('test-project', 'old-project'), | ||
).rejects.toThrow(); | ||
await expect(() => { | ||
return createSlateTheme('test-project', 'old-project'); | ||
}).toThrow(); | ||
}); | ||
@@ -59,5 +59,5 @@ | ||
await expect( | ||
createSlateTheme('test-project', 'shopify/test-repo'), | ||
).rejects.toThrow(); | ||
expect(() => { | ||
return createSlateTheme('test-project', 'shopify/test-repo'); | ||
}).toThrow(); | ||
}); |
{ | ||
"name": "create-slate-theme", | ||
"version": "1.0.0-alpha.7", | ||
"version": "1.0.0-alpha.8", | ||
"description": "Create a new slate project from an existing slate theme repo", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
33546
337