Skip to content
Snippets Groups Projects
Commit 24570b79 authored by Kevin Jahns's avatar Kevin Jahns
Browse files

defined specs

parent f9985352
No related branches found
No related tags found
No related merge requests found
......@@ -18,14 +18,14 @@
- umdStrict
Test port (TestPort):
Serve the tests on port 8888 (default)
Serve the specs on port 8888 (default)
Commands:
- build:
Build this library
- develop:
Watch the ./src directory.
Builds and tests the library on changes.
Builds and specs the library on changes.
Starts an http-server and serves the test suite on http://127.0.0.1:8888.
- build_test:
Builds the test suite
......@@ -51,7 +51,7 @@ var watch = require("gulp-watch");
var files = {
y: ["src/**/*.js"],
lint: ["src/**/*.js", "gulpfile.js"],
tests: ["tests/**/*.js"],
specs: ["src/**/*.spec.js"],
build_test: ["build_test/y.js"]
};
......@@ -65,7 +65,7 @@ var options = minimist(process.argv.slice(2), {
});
gulp.task("build_test", function () {
return gulp.src(files.y.concat(files.tests))
return gulp.src(files.y.concat(files.specs))
.pipe(sourcemaps.init())
.pipe(concat(options.name))
.pipe(babel({
......
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Jasmine Spec Runner: repeat</title>
<!-- Jasmine files -->
<link href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css" rel="stylesheet"/>
<script type="text/javascript" src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script type="text/javascript" src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<!-- CUSTOMIZE: The code to be tested and the tests -->
<script type="text/javascript" src="../build/y.js"></script>
<script type="text/javascript">
(function() {
var jasmineEnv = jasmine.getEnv();
window.onload = function() {
jasmineEnv.execute();
};
})();
</script>
</head>
<body>
</body>
</html>
/* @flow */
/*eslint-env node, jasmine */
describe("A suite", function() {
it("contains spec with an expectation", function() {
expect(true).toBe(true);
});
});
"use strict";function _classCallCheck(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function add(e){return e+4}exports.__esModule=!0;var Buffer=function e(){_classCallCheck(this,e),this.i=4};add("5"),add("6");var buffer=new Buffer(3);exports["default"]=Buffer,module.exports=exports["default"];
"use strict";function _classCallCheck(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function add(n){return n+4}var Buffer=function n(){_classCallCheck(this,n),this.i=4};add("5"),add("6"),describe("A suite",function(){it("contains spec with an expectation",function(){expect(!0).toBe(!0)})});
//# sourceMappingURL=y.js.map
\ No newline at end of file
{"version":3,"sources":["y.js","Buffer.js"],"names":["_classCallCheck","instance","Constructor","TypeError","add","x","exports","__esModule","Buffer","this","i","buffer","module"],"mappings":"AAEA,YAIA,SAASA,iBAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCCIhH,QAAAC,KAAAC,GACA,MAAAA,GAAA,EDPAC,QAAQC,YAAa,CAIrB,ICNAC,QAEA,QAFAA,KDOER,gBAAgBS,KCPlBD,GAGAC,KAAAC,EAAA,EAUAN,KAAA,KACAA,IAAA,IDbA,IAAAO,QAAA,GAAAH,QAAA,EAuBAF,SAAQ,WArBRE,OAsBAI,OAAON,QAAUA,QAAQ","file":"y.js","sourcesContent":["/* @flow */\n/* global Buffer */\n\nvar buffer = new Buffer(3);\n\nexport default Buffer\n","/* @flow */\n\nclass Buffer {\n i : number;\n constructor () {\n this.i = 4;\n }\n}\n\n\nfunction add(x : string){\n return x + 4;\n}\n\n\nadd(\"5\");\nadd(\"6\");\n"],"sourceRoot":"/source/"}
\ No newline at end of file
{"version":3,"sources":["y.js","Buffer.js","Buffer.spec.js"],"names":["_classCallCheck","instance","Constructor","TypeError","add","x","Buffer","this","i","describe","it","expect","toBe"],"mappings":"AAGA,YAEA,SAASA,iBAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCCMhH,QAAAC,KAAAC,GACA,MAAAA,GAAA,EDLA,GCJAC,QAEA,QAFAA,KDKEN,gBAAgBO,KCLlBD,GAGAC,KAAAC,EAAA,EAUAJ,KAAA,KACAA,IAAA,KCdAK,SAAA,UAAA,WACAC,GAAA,oCAAA,WACAC,QAAA,GAAAC,MAAA","file":"y.js","sourcesContent":["/* @flow */\n/* global Buffer */\n\nexport default Buffer;\n","/* @flow */\n/* global Buffer */\n\nclass Buffer { //eslint-disable-line no-unused-vars\n i : number;\n constructor () {\n this.i = 4;\n }\n}\n\n\nfunction add(x : string){\n return x + 4;\n}\n\n\nadd(\"5\");\nadd(\"6\");\n","/* @flow */\n/*eslint-env jasmine */\n\ndescribe(\"A suite\", function() {\n it(\"contains spec with an expectation\", function() {\n expect(true).toBe(true);\n });\n});\n"],"sourceRoot":"/source/"}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment