Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanscottaudio committed Apr 17, 2017
1 parent 5f0f4a4 commit 806a83a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"lint": "semistandard | snazzy",
"test:node": "nyc babel-tape-runner test/*-test.js",
"test:browser": "browserify -t babelify -t brfs -d test/*-test.js | tape-run | faucet",
"test:browser": "browserify -t babelify -t brfs -d test/*-test.js | devtool -c -h --bf --no-nt | faucet",
"test": "npm run test:node && npm run test:browser && npm run lint",
"build": "rm -rf dist && mkdir -p dist && babel lib --out-dir dist",
"watch": "rm -rf dist && mkdir -p dist && babel lib --out-dir dist --watch",
Expand Down Expand Up @@ -35,14 +35,15 @@
"babelify": "^7.2.0",
"brfs": "^1.4.3",
"browserify": "^13.0.0",
"devtool": "^2.3.1",
"faucet": "0.0.1",
"hyperscript": "^1.4.7",
"nyc": "^8.3.0",
"query-dom": "^3.0.7",
"semistandard-deku": "micnews/semistandard#deku",
"snazzy": "^5.0.0",
"tapava": "^2.3.0",
"tape-catch": "^1.0.4",
"tape-run": "^2.1.4",
"tsml": "^1.0.1"
},
"dependencies": {
Expand Down
16 changes: 8 additions & 8 deletions test/embed-code-parse-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ test('facebook', t => {
expectedVideo
);

t.equals(
t.is(
renderAndParse(expectedVideo).url,
expectedVideo.url
);
Expand Down Expand Up @@ -206,7 +206,7 @@ test('facebook', t => {
);
t.deepEqual(parseInput('//facebook.com/zuck/posts/10102593740125791'), expectedPost);

t.equals(
t.is(
renderAndParse(expectedPost).url,
expectedPost.url
);
Expand Down Expand Up @@ -239,7 +239,7 @@ test('facebook', t => {
parseInput('//facebook.com/rewire.news/photos/a.102749171737.90216.9432926737/10152515593211738'),
expectedPagePhoto);

t.equals(
t.is(
renderAndParse(expectedPagePhoto).url,
expectedPagePhoto.url
);
Expand All @@ -264,7 +264,7 @@ test('facebook', t => {
parseInput('https://www.facebook.com/photo.php?fbid=10103183415950711&set=pcb.10103183428221121&type=3&theater'),
expectedPhoto);

t.equals(
t.is(
renderAndParse(expectedPhoto).url,
expectedPhoto.url
);
Expand Down Expand Up @@ -300,7 +300,7 @@ test('youtube', t => {
t.deepEqual(parseInput('http://youtu.be/I7IdS-PbEgI'), expected);
t.deepEqual(parseInput('//youtu.be/I7IdS-PbEgI'), expected);

t.equals(
t.is(
renderAndParse(expected).youtubeId,
expected.youtubeId
);
Expand Down Expand Up @@ -355,7 +355,7 @@ test('twitter', t => {
expected
);

t.equals(
t.is(
renderAndParse(expected).url,
expected.url
);
Expand Down Expand Up @@ -392,7 +392,7 @@ test('tumblr', t => {
expected
);

t.equals(
t.is(
renderAndParse(expected).url,
expected.url
);
Expand Down Expand Up @@ -572,7 +572,7 @@ test('scribd', t => {
url: 'https://www.scribd.com/embeds/320741042/content'
};

t.deepEqual(parseInput(scribdCode), expectedDocument);
t.deepEqual(parseInput(scribdCodeDocument), expectedDocument);
t.deepEqual(parseInput('https://www.scribd.com/document/320741042/Mike-Crapo-Missing-Poster-2-10-2017'), expected);
});

Expand Down
2 changes: 1 addition & 1 deletion test/hyperscript-compability-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from './tape-wrapper';

test('hyperscript + embeds compability', t => {
t.doesNotThrow(function () {
t.notThrows(function () {
require('hyperscript');
require('./../lib');
});
Expand Down
13 changes: 6 additions & 7 deletions test/tape-wrapper.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import test from 'tape-catch';
import test from 'tapava';

export default (msg, cb) => {
test(msg, (t) => {
cb(t);
t.end();
});
};
if (process.browser) {
test.onFinish(global.close);
}

export default test;

0 comments on commit 806a83a

Please sign in to comment.