Skip to content

Commit c6fa086

Browse files
authored
test files
1 parent 3979983 commit c6fa086

12 files changed

+95
-0
lines changed

tests/0-main.js

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
import ClassRoom from "./0-classroom.js";
12

3+
const room = new ClassRoom(10);
4+
console.log(room._maxStudentsSize)

tests/1-main.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import initializeRooms from './1-make_classrooms.js';
2+
3+
console.log(initializeRooms());

tests/10-main.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Car from "./10-car.js";
2+
3+
class TestCar extends Car {}
4+
5+
const tc1 = new TestCar("Nissan", "Turbo", "Pink");
6+
const tc2 = tc1.cloneCar();
7+
8+
console.log(tc1);
9+
console.log(tc1 instanceof TestCar);
10+
11+
console.log(tc2);
12+
console.log(tc2 instanceof TestCar);
13+
14+
console.log(tc1 == tc2);

tests/100-main.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import EVCar from './100-evcar.js';
2+
3+
const ec1 = new EVCar("Tesla", "Turbo", "Red", "250");
4+
console.log(ec1);
5+
6+
const ec2 = ec1.cloneCar();
7+
console.log(ec2);

tests/2-main.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import HolbertonCourse from "./2-hbtn_course.js";
2+
3+
const c1 = new HolbertonCourse("ES6", 1, ["Bob", "Jane"])
4+
console.log(c1.name);
5+
c1.name = "Python 101";
6+
console.log(c1);
7+
8+
try {
9+
c1.name = 12;
10+
}
11+
catch(err) {
12+
console.log(err);
13+
}
14+
15+
try {
16+
const c2 = new HolbertonCourse("ES6", "1", ["Bob", "Jane"]);
17+
}
18+
catch(err) {
19+
console.log(err);
20+
}

tests/3-main.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Currency from "./3-currency.js";
2+
3+
const dollar = new Currency('$', 'Dollars');
4+
console.log(dollar.displayFullCurrency());

tests/4-main.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Pricing from './4-pricing.js';
2+
import Currency from './3-currency.js';
3+
4+
const p = new Pricing(100, new Currency("EUR", "Euro"))
5+
console.log(p);
6+
console.log(p.displayFullPrice());

tests/5-main.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Building from './5-building.js';
2+
3+
const b = new Building(100);
4+
console.log(b);
5+
6+
class TestBuilding extends Building {}
7+
8+
try {
9+
new TestBuilding(200)
10+
}
11+
catch(err) {
12+
console.log(err);
13+
}

tests/6-main.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import SkyHighBuilding from './6-sky_high.js';
2+
3+
const building = new SkyHighBuilding(140, 60);
4+
console.log(building.sqft);
5+
console.log(building.floors);
6+
console.log(building.evacuationWarningMessage());

tests/7-main.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Airport from "./7-airport.js";
2+
3+
const airportSF = new Airport('San Francisco Airport', 'SFO');
4+
console.log(airportSF);
5+
console.log(airportSF.toString());

tests/8-main.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import HolbertonClass from "./8-hbtn_class.js";
2+
3+
const hc = new HolbertonClass(12, "Mezzanine")
4+
console.log(Number(hc));
5+
console.log(String(hc));

tests/9-main.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import listOfStudents from "./9-hoisting.js";
2+
3+
console.log(listOfStudents);
4+
5+
const listPrinted = listOfStudents.map(
6+
student => student.fullStudentDescription
7+
);
8+
9+
console.log(listPrinted)

0 commit comments

Comments
 (0)