Add empty spec skeleton.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 17 Jul 2013 08:28:14 +0000 (16:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 17 Jul 2013 08:28:14 +0000 (16:28 +0800)
spec/index.html [new file with mode: 0644]
spec/main.js [new file with mode: 0644]
spec/package.json [new file with mode: 0644]

diff --git a/spec/index.html b/spec/index.html
new file mode 100644 (file)
index 0000000..4a0bf3f
--- /dev/null
@@ -0,0 +1,38 @@
+<html>
+<head>
+  <link href="node_modules/mocha/mocha.css" rel="stylesheet">
+</head>
+<body>
+
+<div id="mocha"></div>
+
+<script type="text/javascript" charset="utf-8">
+(function() {
+  require('coffee-script'); // Supports .coffee tests.
+
+  var Mocha = require('mocha');
+
+  var mocha = new Mocha();
+  mocha.ui('bdd').reporter('html');
+
+  var query = Mocha.utils.parseQuery(window.location.search || '');
+  if (query.grep) mocha.grep(query.grep);
+  if (query.invert) mocha.invert();
+
+  // Read all test files.
+  var finder = require('findit').find(__dirname);
+
+  finder.on('file', function(file) {
+    if (/.coffee$/.test(file))
+      mocha.addFile(file);
+  });
+
+  finder.on('end', function() {
+    mocha.run(function() {
+      Mocha.utils.highlightTags('code');
+    });
+  });
+})();
+</script>
+</body>
+</html>
diff --git a/spec/main.js b/spec/main.js
new file mode 100644 (file)
index 0000000..41c2945
--- /dev/null
@@ -0,0 +1,14 @@
+var app = require('app');
+var BrowserWindow = require('browser-window');
+
+var window = null;
+
+app.on('finish-launching', function() {
+  window = new BrowserWindow({
+    title: 'atom-shell tests',
+    width: 800,
+    height: 600
+  });
+  window.loadUrl('file://' + __dirname + '/index.html');
+  window.focus();
+});
diff --git a/spec/package.json b/spec/package.json
new file mode 100644 (file)
index 0000000..8201e25
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "name": "atom-shell-specs",
+  "main": "main.js",
+  "version": "0.1.0",
+  "dependencies": {
+    "mocha": "*",
+    "findit": "*"
+  }
+}