Skip to content

Commit

Permalink
Set js2r-prefer-let-over-var to nil in tests
Browse files Browse the repository at this point in the history
Depending on the order of the execution of tests, js2r-prefer-let-over-var might
have been set to t before running some of the tests of js2r-extract-var.el,
which will result in failing tests.
  • Loading branch information
NicolasPetton committed Oct 13, 2017
1 parent a8b2440 commit a606a7d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions features/js2r-extract-var.feature
Expand Up @@ -3,6 +3,7 @@ Feature: Extract var
Scenario: Extracting region
When I insert "abc(1 + 2 + 3, 4 + 5);"
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "1"
And I set the mark
And I go to the end of the word "2"
Expand All @@ -18,6 +19,7 @@ Feature: Extract var
Scenario: Extracting function parameter
When I insert "abc(1 + 2 + 3, 4 + 5);"
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "2"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -36,6 +38,7 @@ Feature: Extract var
}
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "abc"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -56,6 +59,7 @@ Feature: Extract var
}
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "def"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -74,6 +78,7 @@ Feature: Extract var
abc.def.ghi();
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "def"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -92,6 +97,7 @@ Feature: Extract var
});
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "baz"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -114,6 +120,7 @@ Feature: Extract var
}
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "true"
And I press "C-c C-m ev"
And I press "C-u DEL"
Expand All @@ -138,6 +145,7 @@ Feature: Extract var
}
"""
And I turn on js2-mode and js2-refactor-mode
And I set js2r-prefer-let-over-var to nil
And I go to the front of the word "3"
And I set the mark
And I go to the end of the word "foo"
Expand Down

0 comments on commit a606a7d

Please sign in to comment.