aboutsummaryrefslogtreecommitdiffhomepage
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/fixtures/eslintignore.git/.eslintrc7
-rw-r--r--spec/fixtures/test.git/.eslintrc7
-rw-r--r--spec/fixtures/test.git/hello.js2
-rw-r--r--spec/pronto/eslint_spec.rb12
4 files changed, 22 insertions, 6 deletions
diff --git a/spec/fixtures/eslintignore.git/.eslintrc b/spec/fixtures/eslintignore.git/.eslintrc
new file mode 100644
index 0000000..f94ba96
--- /dev/null
+++ b/spec/fixtures/eslintignore.git/.eslintrc
@@ -0,0 +1,7 @@
1{
2 "env": {
3 "browser": true,
4 "es6": true
5 },
6 "extends": "eslint:recommended"
7}
diff --git a/spec/fixtures/test.git/.eslintrc b/spec/fixtures/test.git/.eslintrc
new file mode 100644
index 0000000..f94ba96
--- /dev/null
+++ b/spec/fixtures/test.git/.eslintrc
@@ -0,0 +1,7 @@
1{
2 "env": {
3 "browser": true,
4 "es6": true
5 },
6 "extends": "eslint:recommended"
7}
diff --git a/spec/fixtures/test.git/hello.js b/spec/fixtures/test.git/hello.js
index 2d1b996..6ad633d 100644
--- a/spec/fixtures/test.git/hello.js
+++ b/spec/fixtures/test.git/hello.js
@@ -3,3 +3,5 @@ function HelloWorld(name)
3 if (foo) foo++; 3 if (foo) foo++;
4 alert(name); 4 alert(name);
5} 5}
6
7function Empty() {}
diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb
index 1117e15..27f57d1 100644
--- a/spec/pronto/eslint_spec.rb
+++ b/spec/pronto/eslint_spec.rb
@@ -17,22 +17,22 @@ module Pronto
17 it { should == [] } 17 it { should == [] }
18 end 18 end
19 19
20 context 'patches with a four and a five warnings' do 20 context 'patches with a one and a four warnings' do
21 include_context 'test repo' 21 include_context 'test repo'
22 22
23 let(:patches) { repo.diff('master') } 23 let(:patches) { repo.diff('master') }
24 24
25 its(:count) { should == 9 } 25 its(:count) { should == 5 }
26 its(:'first.msg') { should == "Expected { after 'if' condition." } 26 its(:'first.msg') { should == "'foo' is not defined." }
27 end 27 end
28 28
29 context 'repo with ignored and not ignored file, each with five warnings' do 29 context 'repo with ignored and not ignored file, each with three warnings' do
30 include_context 'eslintignore repo' 30 include_context 'eslintignore repo'
31 31
32 let(:patches) { repo.diff('master') } 32 let(:patches) { repo.diff('master') }
33 33
34 its(:count) { should == 5 } 34 its(:count) { should == 3 }
35 its(:'first.msg') { should == "Use the function form of 'use strict'." } 35 its(:'first.msg') { should == "'HelloWorld' is defined but never used" }
36 end 36 end
37 end 37 end
38 end 38 end