Przeglądaj źródła

remove unused files

pull/342/head
Guillaume Vincent 8 lat temu
rodzic
commit
209eb196cf
10 zmienionych plików z 0 dodań i 254 usunięć
  1. +0
    -26
      test/e2e/custom-assertions/elementCount.js
  2. +0
    -40
      test/e2e/nightwatch.conf.js
  3. +0
    -23
      test/e2e/reports/CHROME_49.0.2623.87_XP_test.xml
  4. +0
    -23
      test/e2e/reports/FIREFOX_45.0_WINDOWS_test.xml
  5. +0
    -30
      test/e2e/runner.js
  6. +0
    -14
      test/e2e/specs/test.js
  7. +0
    -5
      test/unit/.eslintrc
  8. +0
    -13
      test/unit/index.js
  9. +0
    -65
      test/unit/karma.conf.js
  10. +0
    -15
      test/unit/specs/Hello.spec.js

+ 0
- 26
test/e2e/custom-assertions/elementCount.js Wyświetl plik

@@ -1,26 +0,0 @@
// A custom Nightwatch assertion.
// the name of the method is the filename.
// can be used in tests like this:
//
// browser.assert.elementCount(selector, count)
//
// for how to write custom assertions see
// http://nightwatchjs.org/guide#writing-custom-assertions
exports.assertion = function (selector, count) {
this.message = 'Testing if element <' + selector + '> has count: ' + count
this.expected = count
this.pass = function (val) {
return val === this.expected
}
this.value = function (res) {
return res.value
}
this.command = function (cb) {
var self = this
return this.api.execute(function (selector) {
return document.querySelectorAll(selector).length
}, [selector], function (res) {
cb.call(self, res)
})
}
}

+ 0
- 40
test/e2e/nightwatch.conf.js Wyświetl plik

@@ -1,40 +0,0 @@
// http://nightwatchjs.org/guide#settings-file
module.exports = {
"src_folders": ["test/e2e/specs"],
"output_folder": "test/e2e/reports",
"custom_assertions_path": ["test/e2e/custom-assertions"],

"selenium": {
"start_process": true,
"server_path": "node_modules/selenium-server/lib/runner/selenium-server-standalone-2.52.0.jar",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": require('chromedriver').path
}
},

"test_settings": {
"default": {
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true
},

"chrome": {
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
},

"firefox": {
"desiredCapabilities": {
"browserName": "firefox",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}

+ 0
- 23
test/e2e/reports/CHROME_49.0.2623.87_XP_test.xml Wyświetl plik

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites errors="0"
failures="0"
tests="1">

<testsuite name="test"
errors="0" failures="0" hostname="" id="" package="test" skipped="0"
tests="1" time="17.59" timestamp="Tue, 15 Mar 2016 10:19:51 GMT">
<testcase name="default e2e tests" time="17.59" assertions="4">




</testcase>
</testsuite>
</testsuites>

+ 0
- 23
test/e2e/reports/FIREFOX_45.0_WINDOWS_test.xml Wyświetl plik

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites errors="0"
failures="0"
tests="1">

<testsuite name="test"
errors="0" failures="0" hostname="" id="" package="test" skipped="0"
tests="1" time="18.37" timestamp="Tue, 15 Mar 2016 10:19:51 GMT">
<testcase name="default e2e tests" time="18.37" assertions="4">




</testcase>
</testsuite>
</testsuites>

+ 0
- 30
test/e2e/runner.js Wyświetl plik

@@ -1,30 +0,0 @@
// 1. start the dev server
var server = require('../../build/dev-server.js')

// 2. run the nightwatch test suite against it
// to run in additional browsers:
// 1. add an entry in test/e2e/nightwatch.conf.json under "test_settings"
// 2. add it to the --env flag below
// For more information on Nightwatch's config file, see
// http://nightwatchjs.org/guide#settings-file
var spawn = require('cross-spawn')
var runner = spawn(
'./node_modules/.bin/nightwatch',
[
'--config', 'test/e2e/nightwatch.conf.js',
'--env', 'chrome,firefox'
],
{
stdio: 'inherit'
}
)

runner.on('exit', function (code) {
server.close()
process.exit(code)
})

runner.on('error', function (err) {
server.close()
throw err
})

+ 0
- 14
test/e2e/specs/test.js Wyświetl plik

@@ -1,14 +0,0 @@
// For authoring Nightwatch tests, see
// http://nightwatchjs.org/guide#usage

module.exports = {
'default e2e tests': function (browser) {
browser
.url('http://localhost:8080')
.waitForElementVisible('#app', 5000)
.assert.elementPresent('.logo')
.assert.containsText('h1', 'Hello World!')
.assert.elementCount('p', 3)
.end()
}
}

+ 0
- 5
test/unit/.eslintrc Wyświetl plik

@@ -1,5 +0,0 @@
{
"env": {
"jasmine": true
}
}

+ 0
- 13
test/unit/index.js Wyświetl plik

@@ -1,13 +0,0 @@
// Polyfill fn.bind() for PhantomJS
/* eslint-disable no-extend-native */
Function.prototype.bind = require('function-bind')

// require all test files (files that ends with .spec.js)
var testsContext = require.context('./specs', true, /\.spec$/)
testsContext.keys().forEach(testsContext)

// require all src files except main.js for coverage.
// you can also change this to match only the subset of files that
// you want coverage for.
var srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/)
srcContext.keys().forEach(srcContext)

+ 0
- 65
test/unit/karma.conf.js Wyświetl plik

@@ -1,65 +0,0 @@
// This is a karma config file. For more details see
// http://karma-runner.github.io/0.13/config/configuration-file.html
// we are also using it with karma-webpack
// https://github.com/webpack/karma-webpack

var path = require('path')
var merge = require('webpack-merge')
var baseConfig = require('../../build/webpack.base.conf')
var projectRoot = path.resolve(__dirname, '../../')

var webpackConfig = merge(baseConfig, {
// use inline sourcemap for karma-sourcemap-loader
devtool: '#inline-source-map',
vue: {
loaders: {
js: 'isparta'
}
}
})

// no need for app entry during tests
delete webpackConfig.entry

// make sure isparta loader is applied before eslint
webpackConfig.module.preLoaders.unshift({
test: /\.js$/,
loader: 'isparta',
include: projectRoot,
exclude: /test\/unit|node_modules/
})

// only apply babel for test files when using isparta
webpackConfig.module.loaders.some(function (loader, i) {
if (loader.loader === 'babel') {
loader.include = /test\/unit/
return true
}
})

module.exports = function (config) {
config.set({
// to run in additional browsers:
// 1. install corresponding karma launcher
// http://karma-runner.github.io/0.13/config/browsers.html
// 2. add it to the `browsers` array below.
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
reporters: ['spec', 'coverage'],
files: ['./index.js'],
preprocessors: {
'./index.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
coverageReporter: {
dir: './coverage',
reporters: [
{ type: 'lcov', subdir: '.' },
{ type: 'text-summary' }
]
}
})
}

+ 0
- 15
test/unit/specs/Hello.spec.js Wyświetl plik

@@ -1,15 +0,0 @@
import Vue from 'vue'
import Hello from 'src/components/Hello'

describe('Hello.vue', () => {
it('should render correct contents', () => {
const vm = new Vue({
template: '<div><hello></hello></div>',
components: { Hello }
}).$mount()
expect(vm.$el.querySelector('.hello h1').textContent).toBe('Hello World!')
})
})

// also see example testing a component with mocks at
// https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49

Ładowanie…
Anuluj
Zapisz