aboutsummaryrefslogtreecommitdiffstats
path: root/test.js
diff options
context:
space:
mode:
authorSindre Sorhus <sindresorhus@gmail.com>2017-12-29 21:14:52 +0100
committerSindre Sorhus <sindresorhus@gmail.com>2017-12-29 22:15:18 +0100
commit58bb6ffee1c8c26cb360fe0f1107fd6f5b7f5dfb (patch)
tree2ee6317a8e897e10047c2f1cce6a75b20ac11dc2 /test.js
downloadfile-metadata-58bb6ffee1c8c26cb360fe0f1107fd6f5b7f5dfb.tar.gz
file-metadata-58bb6ffee1c8c26cb360fe0f1107fd6f5b7f5dfb.tar.bz2
file-metadata-58bb6ffee1c8c26cb360fe0f1107fd6f5b7f5dfb.zip
Init
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');
+});