summaryrefslogtreecommitdiffstats
path: root/lib/models/__tests__/templateBlock.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-05-11 13:02:20 +0200
committerSamy Pesse <samypesse@gmail.com>2016-05-11 13:02:24 +0200
commitef589a6b133ac67a7904f8bb2cbec42c96dec914 (patch)
treed505c567cd80b0681bbf5f7b46b2a25ed591e28a /lib/models/__tests__/templateBlock.js
parentd5c4af337795ca5c3d4e6f516aeaef15d51c4e8c (diff)
downloadgitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.zip
gitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.tar.gz
gitbook-ef589a6b133ac67a7904f8bb2cbec42c96dec914.tar.bz2
Switch tests to mocha while keeping jest structure
Diffstat (limited to 'lib/models/__tests__/templateBlock.js')
-rw-r--r--lib/models/__tests__/templateBlock.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/models/__tests__/templateBlock.js b/lib/models/__tests__/templateBlock.js
index fdd0210..e5f7666 100644
--- a/lib/models/__tests__/templateBlock.js
+++ b/lib/models/__tests__/templateBlock.js
@@ -6,7 +6,7 @@ describe('TemplateBlock', function() {
var TemplateBlock = require('../templateBlock');
describe('create', function() {
- pit('must initialize a simple TemplateBlock from a function', function() {
+ it('must initialize a simple TemplateBlock from a function', function() {
var templateBlock = TemplateBlock.create('sayhello', function(block) {
return {
body: '<p>Hello, World!</p>',
@@ -41,7 +41,7 @@ describe('TemplateBlock', function() {
};
});
- expect(templateBlock.getShortcuts()).not.toBeDefined();
+ expect(templateBlock.getShortcuts()).toNotExist();
});
it('must return complete shortcut', function() {
@@ -67,7 +67,7 @@ describe('TemplateBlock', function() {
});
describe('toNunjucksExt()', function() {
- pit('should replace by block anchor', function() {
+ it('should replace by block anchor', function() {
var templateBlock = TemplateBlock.create('sayhello', function(block) {
return 'Hello';
});
@@ -97,7 +97,7 @@ describe('TemplateBlock', function() {
});
});
- pit('must create a valid nunjucks extension', function() {
+ it('must create a valid nunjucks extension', function() {
var templateBlock = TemplateBlock.create('sayhello', function(block) {
return {
body: '<p>Hello, World!</p>',
@@ -120,7 +120,7 @@ describe('TemplateBlock', function() {
});
});
- pit('must apply block arguments correctly', function() {
+ it('must apply block arguments correctly', function() {
var templateBlock = TemplateBlock.create('sayhello', function(block) {
return {
body: '<'+block.kwargs.tag+'>Hello, '+block.kwargs.name+'!</'+block.kwargs.tag+'>',
@@ -143,7 +143,7 @@ describe('TemplateBlock', function() {
});
});
- pit('must accept an async function', function() {
+ it('must accept an async function', function() {
var templateBlock = TemplateBlock.create('sayhello', function(block) {
return Promise()
.then(function() {
@@ -169,7 +169,7 @@ describe('TemplateBlock', function() {
});
});
- pit('must handle nested blocks', function() {
+ it('must handle nested blocks', function() {
var templateBlock = new TemplateBlock({
name: 'yoda',
blocks: Immutable.List(['start', 'end']),