We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f837dfa commit e09e3fbCopy full SHA for e09e3fb
lab1/main_test.js
@@ -46,6 +46,10 @@ test("Test Student's setName", () => {
46
});
47
48
test("Test Student's getName", () => {
49
- // TODO
50
- throw new Error("Test not implemented");
+ const student = new Student();
+ // Test if getName returns empty string if name is undefined
51
+ assert.strictEqual(student.getName(), '');
52
+ // Test if getName returns the name set by setName
53
+ student.setName('John');
54
+ assert.strictEqual(student.getName(), 'John');
55
0 commit comments