forked from SunSpecOrangeButton/obtv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request SunSpecOrangeButton#3 from joelebwf/jest
Added JEST tests to the vue.js application.
- Loading branch information
Showing
5 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
# obtv | ||
# OBTV | ||
|
||
This is the future repository of Orange Button Taxonomy Vision. | ||
The Orange Button Taxonomy Viewer is an in-development web application which allows Taxonomy Metadata to be browsed. | ||
|
||
The application is composed of two parts: | ||
|
||
* Vue.js front-end | ||
* Python FLASK back-end | ||
|
||
Currently the operational procedures are in flux and is not in a documented state. With this said run the viewer.py | ||
python program for the back end and run the VUE application located in the web folder for the front end. Both | ||
follow the default process for running Python and VUE programs and should be self explanatory. There is also an | ||
in-progress disribution script which merges them together into a single application and although it may not fully | ||
work without tweaking it could be used as a starting point. | ||
|
||
Rudimentary unit tests are also available using pytest for the Python Code and Jest for the VUE code. The tests will | ||
be flushed out as development continues. | ||
|
||
Finally more documentation will be made available as development continues. In the meantime if you need help | ||
please reach out on the [Orange Button Slack Channel](https://orange-button.slack.com/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
preset: '@vue/cli-plugin-unit-jest' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import { shallowMount } from '@vue/test-utils' | ||
import App from "@/App.vue"; | ||
import router from "@/router.js"; | ||
import store from "@/store.js"; | ||
// Note: main.js does not work correctly with jest for unknown reasons and is not part of the test | ||
// at this point in time. | ||
|
||
// Jest requires one test case - for the time being it always returns true (a cat is a cat) but | ||
// it also causes syntax check for all the Javascript/Vue files. Future expansion will add | ||
// test cases. | ||
describe('Main', () => { | ||
it('compiles ', () => { | ||
expect("cat").toMatch("cat") | ||
}) | ||
}) |