mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 04:40:39 -07:00
17 lines
597 B
TypeScript
17 lines
597 B
TypeScript
import { expect, use } from 'chai'
|
|
import * as fs from '../../../src/fs/node'
|
|
import * as chaiAsPromised from 'chai-as-promised'
|
|
import { Loader } from '../../../src/fs/loader'
|
|
|
|
use(chaiAsPromised)
|
|
|
|
describe('fs/loader', function () {
|
|
describe('.candidates()', function () {
|
|
it('should break once found', async function () {
|
|
const loader = new Loader({ relativeReference: true, fs, extname: '' } as any)
|
|
const candidates = [...loader.candidates('./foo/bar', ['/root', '/root/foo'], '/root/current', true)]
|
|
expect(candidates.join()).to.equal('/root/foo/bar')
|
|
})
|
|
})
|
|
})
|