This commit is contained in:
schrom01 2022-10-26 21:46:14 +02:00
parent 05bda05ad7
commit 5e9b59ba24
6 changed files with 23 additions and 14 deletions

View File

@ -8,4 +8,3 @@ meinPlayer.play(meinSong)
if(meinPlayer.isPlaying){
console.log(meinPlayer.currentlyPlayingSong.title)
}

View File

@ -4,14 +4,10 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "test",
"start": "node ."
},
"repository": {
"type": "git",
"url": "https://gitea.silias.ch/Roman_Schenk/WBE_Jasmine_demo"
},
"author": "Roman Schenk",
"author": "",
"license": "ISC",
"devDependencies": {
"jasmine": "^4.4.0"

View File

@ -1,15 +1,29 @@
describe("parseToProto", function() {
var obj;
var parseToProto = require("../lib/parse-to-proto");
var proto;
beforeEach(function() {
let proto = {category: "animal"}
proto = {category: "animal"};
});
it("should have category, type, name and age attribute", function() {
let obj = parseToProto('{"type": "cat", "name":"Mimi","age":3}', proto)
let obj = parseToProto('{"type": "cat", "name":"Mimi","age":3}', proto);
expect("animal").toEqual(obj.category);
expect("cat").toEqual(obj.type);
expect("Mimi").toEqual(obj.name);
expect(3).toEqual(obj.age);
});
});