fix(core): update
This commit is contained in:
31
test/test.ts
31
test/test.ts
@ -1,8 +1,8 @@
|
||||
import { tap, expect } from 'tapbundle'
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
import * as path from 'path'
|
||||
import * as path from 'path';
|
||||
|
||||
import * as smartinject from '../dist/index'
|
||||
import * as smartinject from '../ts/index';
|
||||
|
||||
tap.test('should inject a file using fileArray', async () => {
|
||||
return smartinject.injectFileArray([
|
||||
@ -12,18 +12,27 @@ tap.test('should inject a file using fileArray', async () => {
|
||||
`require('./hi2.js')
|
||||
require('through2')
|
||||
console.log('this console comment was injected')
|
||||
`)
|
||||
`
|
||||
)
|
||||
}
|
||||
])
|
||||
})
|
||||
]);
|
||||
});
|
||||
|
||||
tap.test('should log hi to console', async () => {
|
||||
require(path.join(__dirname, 'hi.js'))
|
||||
require(path.join(__dirname, 'hi.js'));
|
||||
});
|
||||
|
||||
tap.test('should get a string for a filePath from a .js file', async () => {
|
||||
let fileString = smartinject.getFileString(path.join(__dirname, 'hi.js'));
|
||||
console.log(fileString);
|
||||
});
|
||||
|
||||
tap.test('should accept a typescript registration', async () => {
|
||||
|
||||
})
|
||||
|
||||
tap.test('should get a string for a filePath', async () => {
|
||||
let fileString = smartinject.getFileString(path.join(__dirname, 'hi.js'))
|
||||
console.log(fileString)
|
||||
tap.test('should get a string for a file path from a .ts file', async () => {
|
||||
let fileString = smartinject.getFileString(path.join(__dirname, 'typescript.example.ts'));
|
||||
})
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
0
test/typescript.example.ts
Normal file
0
test/typescript.example.ts
Normal file
Reference in New Issue
Block a user