Import and convert battlesuit data
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { doesDirExist } from './fsUtils'
|
||||
import path from 'path'
|
||||
|
||||
describe('doesDirExist', () => {
|
||||
it('returns true if dir exists', () => {
|
||||
const existingDir = path.join(process.cwd(), 'src')
|
||||
const fn = jest.fn(doesDirExist)
|
||||
|
||||
fn(existingDir)
|
||||
|
||||
expect(fn).toReturnWith(true)
|
||||
})
|
||||
|
||||
it('returns false if dir does not exist', () => {
|
||||
const existingDir = path.join(process.cwd(), 'never-exists')
|
||||
const fn = jest.fn(doesDirExist)
|
||||
|
||||
fn(existingDir)
|
||||
|
||||
expect(fn).toReturnWith(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user