mirror of
https://github.com/pebble-dev/clay.git
synced 2026-09-03 07:37:46 -04:00
strip out components into separate repo
This commit is contained in:
+5
-5
@@ -10,11 +10,11 @@ var idCounter = 0;
|
||||
var componentRegistry = require('../src/scripts/lib/component-registry');
|
||||
|
||||
// add some components to the registry to test
|
||||
componentRegistry.text = require('../src/scripts/components/text');
|
||||
componentRegistry.input = require('../src/scripts/components/input');
|
||||
componentRegistry.toggle = require('../src/scripts/components/toggle');
|
||||
componentRegistry.footer = require('../src/scripts/components/footer');
|
||||
componentRegistry.select = require('../src/scripts/components/select');
|
||||
ClayConfig.registerComponent(require('pebble-clay-components/dist/components/text'));
|
||||
ClayConfig.registerComponent(require('pebble-clay-components/dist/components/input'));
|
||||
ClayConfig.registerComponent(require('pebble-clay-components/dist/components/toggle'));
|
||||
ClayConfig.registerComponent(require('pebble-clay-components/dist/components/footer'));
|
||||
ClayConfig.registerComponent(require('pebble-clay-components/dist/components/select'));
|
||||
|
||||
/**
|
||||
* @param {string|{}} config
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
'use strict';
|
||||
|
||||
// Karma configuration
|
||||
// Generated on Mon Jan 25 2016 15:19:28 GMT-0800 (PST)
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: '..',
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['browserify', 'mocha'],
|
||||
|
||||
browserify: {
|
||||
debug: true,
|
||||
plugin: [
|
||||
[
|
||||
'sourcemapify',
|
||||
{ root: '/Users/keegan/eclipse_workspace/pebble-clay' }
|
||||
]
|
||||
],
|
||||
transform: [
|
||||
[
|
||||
'stringify',
|
||||
{ extensions: ['.html', '.tpl'] }
|
||||
],
|
||||
'deamdify'
|
||||
]
|
||||
},
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'test/spec/**/*.js'
|
||||
],
|
||||
|
||||
// list of files to exclude
|
||||
exclude: [],
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
'test/spec/**/*.js': ['browserify']
|
||||
},
|
||||
|
||||
// Which plugins to enable
|
||||
plugins: [
|
||||
'karma-chrome-launcher',
|
||||
'karma-mocha',
|
||||
'karma-mocha-reporter',
|
||||
'karma-browserify'
|
||||
],
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress', 'mocha'],
|
||||
|
||||
// web server port
|
||||
port: 9877,
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN
|
||||
// || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true,
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: ['Chrome'],
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: true,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
var assert = require('chai').assert;
|
||||
var sinon = require('sinon');
|
||||
var textComponent = require('../../../src/scripts/components/text');
|
||||
var textComponent = require('pebble-clay-components/dist/components/text');
|
||||
var componentRegistry = require('../../../src/scripts/lib/component-registry');
|
||||
var checkReadOnly = require('../../test-utils').checkReadOnly;
|
||||
var fixtures = require('../../fixture');
|
||||
@@ -128,6 +128,8 @@ describe('ClayConfig', function() {
|
||||
|
||||
clayConfig.build();
|
||||
});
|
||||
|
||||
// @todo test for validation
|
||||
});
|
||||
|
||||
describe('.build()', function() {
|
||||
|
||||
Reference in New Issue
Block a user