fix: set prototype names on gin::Constructible classes (#39006)

* fix: set prototype names on gin::Constructible classes

* test: add tests
This commit is contained in:
Shelley Vohr 2023-07-10 11:49:20 +02:00 committed by GitHub
parent 56b5c00312
commit c7bdd907d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 71 additions and 15 deletions

View file

@ -11,6 +11,10 @@ import { setTimeout } from 'node:timers/promises';
const fixturesPath = path.resolve(__dirname, 'fixtures');
describe('Menu module', function () {
it('sets the correct class name on the prototype', () => {
expect(Menu.prototype.constructor.name).to.equal('Menu');
});
describe('Menu.buildFromTemplate', () => {
it('should be able to attach extra fields', () => {
const menu = Menu.buildFromTemplate([