-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] Implementando test unitarios para el prototipo Book
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use strict' | ||
|
||
const { assert } = require('chai') | ||
|
||
const Book = require('../lib/Book') | ||
|
||
describe('Prototype Book.js', function() { | ||
it('Book.prototype should be an object', function() { | ||
assert.isObject(Book.prototype, 'Book.prototype is not an object') | ||
}) | ||
|
||
it('Should have a getName() method', function() { | ||
assert.property(Book.prototype, 'getName', 'Book.prototype.getName does not exist') | ||
|
||
assert.isFunction(Book.prototype.getName, 'Book.prototype.getName is not a function') | ||
}) | ||
|
||
it('Should have a getContent() method', function() { | ||
assert.property(Book.prototype, 'getContent', 'Book.prototype.getContent does not exist') | ||
|
||
assert.isFunction(Book.prototype.getContent, 'Book.prototype.getContent is not a function') | ||
}) | ||
|
||
it('Should have a create() method', function() { | ||
assert.property(Book.prototype, 'create', 'Book.prototype.create does not exist') | ||
|
||
assert.isFunction(Book.prototype.create, 'Book.prototype.create is not a function') | ||
}) | ||
|
||
it('Should have a getDigit() method', function() { | ||
assert.property(Book.prototype, 'getDigit', 'Book.prototype.getDigit does not exist') | ||
|
||
assert.isFunction(Book.prototype.getDigit, 'Book.prototype.getDigit is not a function') | ||
}) | ||
|
||
it('Should have a getPath() method', function() { | ||
assert.property(Book.prototype, 'getPath', 'Book.prototype.getPath does not exist') | ||
|
||
assert.isFunction(Book.prototype.getPath, 'Book.prototype.getPath is not a function') | ||
}) | ||
}) |