diff options
Diffstat (limited to 'javascript/tests')
-rw-r--r-- | javascript/tests/.eslintrc.js | 5 | ||||
-rw-r--r-- | javascript/tests/acceptance/haskell-module-test.js | 28 | ||||
-rw-r--r-- | javascript/tests/acceptance/package-test.js | 23 | ||||
-rw-r--r-- | javascript/tests/acceptance/packages-test.js | 16 | ||||
-rw-r--r-- | javascript/tests/helpers/.gitkeep | 0 | ||||
-rw-r--r-- | javascript/tests/index.html | 33 | ||||
-rw-r--r-- | javascript/tests/integration/.gitkeep | 0 | ||||
-rw-r--r-- | javascript/tests/integration/components/.gitkeep | 0 | ||||
-rw-r--r-- | javascript/tests/test-helper.js | 8 |
9 files changed, 0 insertions, 113 deletions
diff --git a/javascript/tests/.eslintrc.js b/javascript/tests/.eslintrc.js deleted file mode 100644 index fbf2555..0000000 --- a/javascript/tests/.eslintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - env: { - embertest: true - } -}; diff --git a/javascript/tests/acceptance/haskell-module-test.js b/javascript/tests/acceptance/haskell-module-test.js deleted file mode 100644 index 4eab15d..0000000 --- a/javascript/tests/acceptance/haskell-module-test.js +++ /dev/null @@ -1,28 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, find } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; - - -module('Acceptance | haskell-module', function(hooks) { - setupApplicationTest(hooks); - - //Test data is in 'server/mocks/packages.js' - test('visiting /package/test-package-0.1.0.0/show/app/Main.hs', async function(assert) { - await visit('/package/test-package-0.1.0.0/show/app/Main.hs'); - - assert.equal(currentURL(), '/package/test-package-0.1.0.0/show/app/Main.hs'); - - const lines = Array.from(find('tbody').children).map((tr) => { - return tr.children[1].innerText; - }); - - assert.deepEqual(lines,["module Main where", - "", - "import Lib", - "", - "main :: IO ()", - "main = someFunc", - "", - ""]); - }); -}); diff --git a/javascript/tests/acceptance/package-test.js b/javascript/tests/acceptance/package-test.js deleted file mode 100644 index 09b73f2..0000000 --- a/javascript/tests/acceptance/package-test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, find } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; - - -module('Acceptance | package', function(hooks) { - setupApplicationTest(hooks); - - //Test data is in 'server/mocks/packages.js' - test('visiting /package/test-package-0.1.0.0', async function(assert) { - await visit('/package/test-package-0.1.0.0'); - assert.equal(currentURL(), '/package/test-package-0.1.0.0'); - - const moduleNames = Array.from(find('ul.modules').children).map((li) => { - return [li.innerText,li.children[0].getAttribute('href')]; - }); - - assert.deepEqual(moduleNames,[["app/Main.hs","/package/test-package-0.1.0.0/show/app/Main.hs"], - ["src/Lib.hs","/package/test-package-0.1.0.0/show/src/Lib.hs"], - ["src/Types.hs","/package/test-package-0.1.0.0/show/src/Types.hs"], - ["test/Spec.hs","/package/test-package-0.1.0.0/show/test/Spec.hs"]]); - }); -}); diff --git a/javascript/tests/acceptance/packages-test.js b/javascript/tests/acceptance/packages-test.js deleted file mode 100644 index 106e16a..0000000 --- a/javascript/tests/acceptance/packages-test.js +++ /dev/null @@ -1,16 +0,0 @@ -import { module, test } from 'qunit'; -import { visit, currentURL, find } from '@ember/test-helpers'; -import { setupApplicationTest } from 'ember-qunit'; - -module('Acceptance | packages', function(hooks) { - setupApplicationTest(hooks); - - //Test data is in file 'server/mocks/packages.js' - test('visiting /', async function(assert) { - await visit('/'); - assert.equal(currentURL(), '/'); - const linkToPackage = find('ul a:first-child'); - assert.equal(linkToPackage.innerText, 'test-package-0.1.0.0'); - assert.equal(linkToPackage.getAttribute('href'), '/package/test-package-0.1.0.0'); - }); -}); diff --git a/javascript/tests/helpers/.gitkeep b/javascript/tests/helpers/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/javascript/tests/helpers/.gitkeep +++ /dev/null diff --git a/javascript/tests/index.html b/javascript/tests/index.html deleted file mode 100644 index 06bfc02..0000000 --- a/javascript/tests/index.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <title>HaskellCodeExplorer Tests</title> - <meta name="description" content=""> - <meta name="viewport" content="width=device-width, initial-scale=1"> - - {{content-for "head"}} - {{content-for "test-head"}} - - <link rel="stylesheet" href="{{rootURL}}assets/vendor.css"> - <link rel="stylesheet" href="{{rootURL}}assets/haskell-code-explorer.css"> - <link rel="stylesheet" href="{{rootURL}}assets/test-support.css"> - - {{content-for "head-footer"}} - {{content-for "test-head-footer"}} - </head> - <body> - {{content-for "body"}} - {{content-for "test-body"}} - - <script src="/testem.js" integrity=""></script> - <script src="{{rootURL}}assets/vendor.js"></script> - <script src="{{rootURL}}assets/test-support.js"></script> - <script src="{{rootURL}}assets/haskell-code-explorer.js"></script> - <script src="{{rootURL}}assets/tests.js"></script> - - {{content-for "body-footer"}} - {{content-for "test-body-footer"}} - </body> -</html> diff --git a/javascript/tests/integration/.gitkeep b/javascript/tests/integration/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/javascript/tests/integration/.gitkeep +++ /dev/null diff --git a/javascript/tests/integration/components/.gitkeep b/javascript/tests/integration/components/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/javascript/tests/integration/components/.gitkeep +++ /dev/null diff --git a/javascript/tests/test-helper.js b/javascript/tests/test-helper.js deleted file mode 100644 index 0382a84..0000000 --- a/javascript/tests/test-helper.js +++ /dev/null @@ -1,8 +0,0 @@ -import Application from '../app'; -import config from '../config/environment'; -import { setApplication } from '@ember/test-helpers'; -import { start } from 'ember-qunit'; - -setApplication(Application.create(config.APP)); - -start(); |