aboutsummaryrefslogtreecommitdiff
path: root/test/content/hint.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-14 06:40:49 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-14 06:40:49 +0900
commit890f84c34382253d6c178a5a09149832d145c60f (patch)
tree61356c87d22ede12d1896a4a63bae61ca152ac01 /test/content/hint.test.js
parent9f2dcde5668fd79e5068d4de87a407947a14b5f2 (diff)
move hint component
Diffstat (limited to 'test/content/hint.test.js')
-rw-r--r--test/content/hint.test.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/test/content/hint.test.js b/test/content/hint.test.js
deleted file mode 100644
index 1547971..0000000
--- a/test/content/hint.test.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import { expect } from "chai";
-import Hint from 'content/hint';
-
-describe('Hint class', () => {
- beforeEach(() => {
- document.body.innerHTML = __html__['test/content/hint.html'];
- });
-
- describe('#constructor', () => {
- it('creates a hint element with tag name', () => {
- let link = document.getElementById('test-link');
- let hint = new Hint(link, 'abc');
- expect(hint.element.textContent.trim()).to.be.equal('abc');
- });
-
- it('throws an exception when non-element given', () => {
- expect(() => new Hint(window, 'abc')).to.throw(TypeError);
- });
- });
-
- describe('#show', () => {
- it('shows an element', () => {
- let link = document.getElementById('test-link');
- let hint = new Hint(link, 'abc');
- hint.hide();
- hint.show();
-
- expect(hint.element.style.display).to.not.equal('none');
- });
- });
-
- describe('#hide', () => {
- it('hides an element', () => {
- let link = document.getElementById('test-link');
- let hint = new Hint(link, 'abc');
- hint.hide();
-
- expect(hint.element.style.display).to.equal('none');
- });
- });
-
- describe('#remove', () => {
- it('removes an element', () => {
- let link = document.getElementById('test-link');
- let hint = new Hint(link, 'abc');
-
- expect(hint.element.parentElement).to.not.be.null;
- hint.remove();
- expect(hint.element.parentElement).to.be.null;
- });
- });
-
- describe('#activate', () => {
- // TODO test activations
- });
-});
-
-