My jasmine work good with cli but problem is display result in browser (ReferenceError: require is not defined). In my script i using require node function to load modules.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner v2.4.1</title>
<link rel="shortcut icon" type="image/png" href="node_modules/jasmine-core/lib/jasmine-core/jasmine_favicon.png">
<link rel="stylesheet" href="node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
<script src="/node_modules/systemjs/dist/system.js" type="text/javascript"></script>
<script>
System.config({
baseURL: '/app'
});
System.import('app.component.spec')
.then(null, console.error.bind(console));
</script>
<script src="node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
<script src="node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
<!-- include source files here... -->
<script src="server/scripts/auth.js"></script>
<!-- include spec files here... -->
<script src="spec/server/authSpec.js"></script>
</head>
<body>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire