Skip to content

Commit

Permalink
Add test for md-video to improve code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Jan 25, 2015
1 parent 15b3975 commit 35aeff2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/test_md-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ var mdv = require('../lib/md-video');
var should = require('should');

describe('md-video', function() {
it('format', function() {
it('No size specification', function() {
mdv.marked('$[](movie.mp4)').should.equal('<video src="movie.mp4" controls></video>');
});

it('format', function() {
it('Movie text is specified', function() {
mdv.marked('$[Movie](movie.mp4)').should.equal('<video src="movie.mp4" controls>Movie</video>');
});

it('Only width is specified', function() {
mdv.marked('$[](movie.mp4 =100x)').should.equal('<video src="movie.mp4" width="100" controls></video>');
});

it('format', function() {
it('Only height is specified', function() {
mdv.marked('$[](movie.mp4 =x200)').should.equal('<video src="movie.mp4" height="200" controls></video>');
});

it('format', function() {
it('Both width and height are specified', function() {
mdv.marked('$[](movie.mp4 =100x200)').should.equal('<video src="movie.mp4" width="100" height="200" controls></video>');
});
});

0 comments on commit 35aeff2

Please sign in to comment.