jasmine


Webpack has been initialised using a configuration object that does not match the API schema


enter code herenpm test;
var webpackConfig = require('./webpack.test');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
{pattern: './karma-shim.js', watched: false}
],
exclude: [
],
preprocessors: {
'./karma-shim.js': ['webpack']
},
webpack: webpackConfig,
plugins:[
'karma-jasmine',
'karma-chrome-launcher',
require("karma-webpack")
],
proxies:{
"/app/": "http://localhost:3000/src/app"
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity
})
}
module.exports = {
devtool: 'cheap-module-eval-source-map',
resolve: {
extensions: ['','.ts','.js']
},
module: {
loaders: [
//以.ts结尾的文件使用 TypeScript loader
{test: /.ts$/,loader: 'awesome-typescript-loader'},
{
test:/\.html$/,
loader: 'html'
},
{
test:/\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'null'
},
{
test:/\.css$/,
loader: 'null'
}
]
}
}
then throws a BUG.
karma start karma.conf.js
keywords if/then/else require v5 option
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry should be one of these:
object { : string | [string] } | string | [string]
The entry point(s) of the compilation.
- configuration.resolve.extensions[0] should not be empty.
Can not load "webpack"!
First i don't see any entey point mentioned in config file which is required in order to webpack understand where to start from.
Second your resolve option in config file hase mentioned three types to resolve and first one is empty string which webpack don't like so by removing that empty string it should fix that problem
Hope this help you to fix the issue.

Related Links

How to get Jasmine tests syntax highlighting in PhpStorm?
How to run cucumber and jasmine tests sequentually
Protractor-html-reports config for many specs
Async call in beforeAll
Angular Jasmine Unit Testing: Error: [$injector:unpr] Unknown provider: $confirmProvider
Jasmine 1.3 - is it possible to unspy?
Idiomatically testing when.js promises with Jasmine
how to write a jasmine test for a setinterval inside a prototype
karma not finding files
how to switching off stack failure message?
Jasmine - DRY test cases - print custom result
Running spec after promise has been resolved
How to mock a method which is inside a sub-property of a service?
How do I find which test Karma is skipping?
How can I open a url in PhantomJS with Karma and Jasmine?
angular is not defined in meteor-velocity jasmine tests

Categories

HOME
makefile
semantic-ui
reverse-engineering
angular-cli
bower
apollo
jscript
branch.io
jframe
cortex-a
informatica-powercenter
data-analysis
qt-installer
nuxt.js
postmessage
ida
pdo
yeoman-generator
pyyaml
ada
atlassian-plugin-sdk
zend-framework-mvc
primes
zoho
android-fragmentactivity
distance
excel-2010
esql
header-files
mef2
pep8-assembly
hibernate-cache
referenceerror
modelandview
rhino
passenger
office365connectors
discord.net
strstr
active-model-serializers
ssh.net
ttcn
mod-fcgid
amazon-clouddrive
azure-availability-set
timesten
gauss
gist
applepayjs
multi-agent
azureportal
bnd
unity3d-editor
xib
manifest.mf
ruby-2.0
metalsmith
squirrel
gradle-release-plugin
drf-nested-routers
wikitext
sem
rx-groovy
harp
rspec3
swift2.1
hiera
start-job
temp-tables
ember-components
node-imagemagick
getimagedata
spdy
coin-flipping
colt
httpcontext
circos
bfd
html-form-post
mstsc
pascals-triangle
git-filter-branch
linkedhashset
autostart
vim-powerline
scrollto
continuous-testing
caliper
unions
objective-c-protocol
supersized
querystringparameter
charts4j
opengl-es-lighting
authenticode
.app
loadui
requestfactory
hardware-acceleration
trampolines
jquery-ui-button
webrat
hmacsha1
winsnmp
opcodes
dotproject

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App