Собрав геттеры и сеттеры, я понял, что они не нужны.
Чего мне не хватает? Как сделать так, чтобы при вызове атрибутов они были в классе?
'use strict';
const { Book } = require('../app');
const { Page } = require('../page');
const { Bookmark } = require('../bookmark');
//
const chai = require('chai');
const expect = chai.expect;
it('has a bookmark', function () {
let bookmark = new Bookmark('bookmark');
bookmark.material = 'paper';
bookmark.mm='a';
expect(bookmark.mm).to.equal('a');
expect(bookmark.material).to.equal('paper');
})
#../bookmark.js
class Bookmark {
constructor(name) {
this.name = name;
}
}
exports.Bookmark = Bookmark;