Skip to content

Commit f8f0fe6

Browse files
committed
updated files
1 parent a3eface commit f8f0fe6

7 files changed

Lines changed: 290 additions & 0 deletions

File tree

jurassic_park_lab/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
npm-debug.log
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const Dinosaur = function (species, diet, guestsAttractedPerDay) {
2+
this.species = species;
3+
this.diet = diet;
4+
this.guestsAttractedPerDay = guestsAttractedPerDay;
5+
}
6+
7+
module.exports = Dinosaur;

jurassic_park_lab/models/park.js

Whitespace-only changes.

jurassic_park_lab/package-lock.json

Lines changed: 196 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jurassic_park_lab/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "hw_fundamentals_jurassic_park_end",
3+
"version": "1.0.0",
4+
"main": "app.js",
5+
"scripts": {
6+
"test": "mocha specs"
7+
},
8+
"keywords": [],
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"mocha": "^5.1.1"
13+
},
14+
"description": ""
15+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
const assert = require('assert');
2+
const Dinosaur = require('../models/dinosaur.js');
3+
4+
describe('Dinosaur', function() {
5+
6+
let dinosaur;
7+
8+
beforeEach(function () {
9+
dinosaur = new Dinosaur('t-rex', 'carnivore', 50);
10+
});
11+
12+
it('should have a species', function () {
13+
const actual = dinosaur.species;
14+
assert.strictEqual(actual, 't-rex');
15+
});
16+
17+
it('should have a diet', function () {
18+
const actual = dinosaur.diet;
19+
assert.strictEqual(actual, 'carnivore');
20+
});
21+
22+
it('should have an average number of visitors it attracts per day', function () {
23+
const actual = dinosaur.guestsAttractedPerDay;
24+
assert.strictEqual(actual, 50);
25+
});
26+
27+
});
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const assert = require('assert');
2+
const Park = require('../models/park.js');
3+
const Dinosaur = require('../models/dinosaur.js');
4+
5+
describe('Park', function() {
6+
7+
beforeEach(function () {
8+
9+
})
10+
11+
xit('should have a name', function () {
12+
13+
});
14+
15+
xit('should have a ticket price', function () {
16+
17+
});
18+
19+
xit('should have a collection of dinosaurs', function () {
20+
21+
});
22+
23+
xit('should be able to add a dinosaur to its collection', function () {
24+
25+
});
26+
27+
xit('should be able to remove a dinosaur from its collection', function () {
28+
29+
});
30+
31+
xit('should be able to find all dinosaurs of a particular species', function () {
32+
33+
});
34+
35+
xit('should be able to remove all dinosaurs of a particular species', function () {
36+
37+
});
38+
39+
xit('should be able to find the dinosaur that attracts the most visitors', function () {
40+
41+
});
42+
43+
});

0 commit comments

Comments
 (0)