mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
refactor: strictly typed
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ export function mock (options: { [path: string]: (string | fileDescriptor) }) {
|
||||
return file.content
|
||||
}
|
||||
|
||||
fs.exists = async function (path) {
|
||||
fs.exists = async function (path: string) {
|
||||
console.log('mock fs exists called', path)
|
||||
return !!files[path]
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ export const ctx = {
|
||||
posts: [{ category: 'foo' }, { category: 'bar' }]
|
||||
}
|
||||
|
||||
export async function test (src, dst) {
|
||||
export async function test (src: string, dst: string) {
|
||||
const html = await liquid.parseAndRender(src, ctx)
|
||||
return expect(html).to.equal(dst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user