blob: 80dcd8e992e2d58775d996bcc24db7448ca52d8d [file] [log] [blame]
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {assert} from 'chai';
import {ChopsCollapse} from './chops-collapse.js';
let element;
describe('chops-collapse', () => {
beforeEach(() => {
element = document.createElement('chops-collapse');
document.body.appendChild(element);
});
afterEach(() => {
document.body.removeChild(element);
});
it('initializes', () => {
assert.instanceOf(element, ChopsCollapse);
});
it('toggling chops-collapse changes aria-hidden', () => {
element.opened = true;
assert.isNull(element.getAttribute('aria-hidden'));
element.opened = false;
assert.isDefined(element.getAttribute('aria-hidden'));
});
});