mirror of
https://github.com/c8r/x0.git
synced 2024-09-11 13:45:52 +03:00
Only remove output dir if it exists
This commit is contained in:
parent
1b8dde837d
commit
a5bf70ba49
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ package-lock.json
|
||||
site
|
||||
coverage
|
||||
.nyc_output
|
||||
test/output
|
||||
|
@ -64,7 +64,10 @@ test.cb('static picks up routes config', t => {
|
||||
})
|
||||
|
||||
test.cb('static makes a directory', t => {
|
||||
fs.rmdirSync(output)
|
||||
if (fs.existsSync(output)) {
|
||||
fs.rmdirSync(output)
|
||||
}
|
||||
|
||||
x0Static(hello, {
|
||||
outDir: 'test/output'
|
||||
}, (err, result) => {
|
||||
|
Loading…
Reference in New Issue
Block a user