fix(build): migrate filesystem access to smartfs and tighten TypeScript compatibility
This commit is contained in:
+5
-5
@@ -1,10 +1,10 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||
import * as smarthbs from '../ts/index.js';
|
||||
|
||||
import * as smartpath from '@pushrocks/smartpath';
|
||||
import * as path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
let hbs_testfilesDir = path.join(dirname, 'hbs_testfiles');
|
||||
let testPartialDir = path.join(hbs_testfilesDir, 'partials');
|
||||
@@ -15,7 +15,7 @@ tap.test('smarthbs -> should create partials', async () => {
|
||||
});
|
||||
|
||||
tap.test('smarthbs -> should compile a directory', async () => {
|
||||
smarthbs.compileDirectory(hbs_testfilesDir, testResultDir, 'data.json');
|
||||
await smarthbs.compileDirectory(hbs_testfilesDir, testResultDir, 'data.json');
|
||||
});
|
||||
|
||||
tap.test('', async () => {
|
||||
@@ -43,4 +43,4 @@ tap.test('', async () => {
|
||||
expect(missingVars).not.toContain('fourthVar.otherKey.nextKey');
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
Reference in New Issue
Block a user