Skip to content

Commit 5f78dc9

Browse files
committed
updated callback method
1 parent b233ed4 commit 5f78dc9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const code = `
199199
*
200200
* @param {PluginEvent} ev - A plugin event.
201201
*/
202-
export function onHandleVirtual(ev)
202+
export function onHandleVirtualAsync(ev)
203203
{
204204
ev.data.code.push({ code, filePath: path.relative(process.cwd(), __filename) });
205205
}

test/src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { assert } from 'chai';
22

3-
import { onHandleVirtual } from '../../src/index.js';
3+
import { onHandleVirtualAsync } from '../../src/index.js';
44

55
const event = { data: { code: [] } };
66

77
suite('Plugin:', () =>
88
{
99
test('onHandleVirtual is function', () =>
1010
{
11-
assert.isFunction(onHandleVirtual);
11+
assert.isFunction(onHandleVirtualAsync);
1212
});
1313

14-
test('onHandleVirtual returns code', () =>
14+
test('onHandleVirtualAsync returns code', () =>
1515
{
16-
onHandleVirtual(event);
16+
onHandleVirtualAsync(event);
1717

1818
assert.isArray(event.data.code);
1919
assert.isString(event.data.code[0].code);

0 commit comments

Comments
 (0)