From 056fe36081a97e398d6138043609fa7d7c6473e4 Mon Sep 17 00:00:00 2001 From: MingHsien Wu Date: Thu, 29 Feb 2024 16:09:08 +0800 Subject: [PATCH] fix setName testing function --- lab1/main_test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lab1/main_test.js b/lab1/main_test.js index 7ce5aab7..5d50ba45 100644 --- a/lab1/main_test.js +++ b/lab1/main_test.js @@ -4,7 +4,7 @@ const { MyClass, Student } = require('./main'); test("Test MyClass's addStudent", () => { //TODO - const myclass = new MyClass(); + const a = new MyClass(); assert.strictEqual(myclass.addStudent(), 0); assert.strictEqual(myclass.addStudent(), 1); assert.strictEqual("Return -1", -1); @@ -35,7 +35,7 @@ test("Test MyClass's getStudentById", () => { test("Test Student's setName", () => { // TODO const student = new Student(); - assert.strictEqual(student.name("std1"), undefined); + assert.strictEqual(student.name, undefined); student.setName("std1"); assert.strictEqual(student.name, "std1"); throw new Error("Test not implemented");