blob: 7058b654d341aacba56819c58277f18f5fdb3850 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// 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'));
});
});