emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 9693c56 125/271: Move fixture into its own file.


From: Jackson Ray Hamilton
Subject: [elpa] master 9693c56 125/271: Move fixture into its own file.
Date: Thu, 05 Feb 2015 18:30:29 +0000

branch: master
commit 9693c560038d8e08a11ad6588fa9398bc3c1de8c
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Move fixture into its own file.
---
 test/fixtures/function-scopes.js |    5 +++++
 test/specs.js                    |   11 ++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/test/fixtures/function-scopes.js b/test/fixtures/function-scopes.js
new file mode 100644
index 0000000..2f6ed32
--- /dev/null
+++ b/test/fixtures/function-scopes.js
@@ -0,0 +1,5 @@
+var a = function () {};
+function b() {
+    var c = function () {};
+    function d() {}
+}
diff --git a/test/specs.js b/test/specs.js
index abcf591..8eaa15c 100644
--- a/test/specs.js
+++ b/test/specs.js
@@ -1,3 +1,5 @@
+/*jslint stupid: true */
+
 'use strict';
 
 var assert = require('assert');
@@ -39,13 +41,8 @@ describe('emacsBuffer', function () {
 describe('scopifier', function () {
 
     it('should recognize scope levels', function () {
-        var input = [
-            'var a = function () {};',
-            'function b() {',
-            '    var c = function () {};',
-            '    function d() {}',
-            '}'
-        ].join('\n');
+        var fixturePath = path.join(__dirname, 'fixtures/function-scopes.js');
+        var input = fs.readFileSync(fixturePath, 'utf8');
         var output = scopifier(input);
         var emacsBuffer = createEmacsBuffer();
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]