aboutsummaryrefslogtreecommitdiffstats
path: root/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test.js')
-rw-r--r--test.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..5ccfad0
--- /dev/null
+++ b/test.js
@@ -0,0 +1,13 @@
+import test from 'ava';
+import m from '.';
+
+test('async', async t => {
+ const result = await m('index.js');
+ t.is(result.contentType, 'com.netscape.javascript-source');
+ t.is(result.fsName, 'index.js');
+});
+
+test('sync', t => {
+ const result = m.sync('index.js');
+ t.is(result.contentType, 'com.netscape.javascript-source');
+});