[gjs/wip/ptomato/tests: 8/12] coverage test: Fix copypasta errors



commit 03e5aa7c6987f677b40064cee662e028fc492e31
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Oct 24 21:29:33 2016 -0700

    coverage test: Fix copypasta errors
    
    A few coverage tests didn't test what they said the tested. One was
    identical to a test a few lines above. The other had a trailing newline
    whereas the description said it was testing the case without a trailing
    newline.

 installed-tests/js/testCoverage.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/installed-tests/js/testCoverage.js b/installed-tests/js/testCoverage.js
index 19afbe3..7948074 100644
--- a/installed-tests/js/testCoverage.js
+++ b/installed-tests/js/testCoverage.js
@@ -252,11 +252,11 @@ function testExpressionLinesFoundForObjectPropertyArrayExpression() {
 
 function testExpressionLinesFoundForObjectArgsToReturn() {
     let foundLinesInsideObjectArgsToReturn =
-        parseScriptForExpressionLines("var a = {\n" +
-                                      "    Name: {},\n" +
-                                      "};\n");
+        parseScriptForExpressionLines("function f() {\n" +
+                                      "    return {};\n" +
+                                      "}\n");
     assertArrayEquals(foundLinesInsideObjectArgsToReturn,
-                      [1, 2],
+                      [2],
                       JSUnit.assertEquals);
 }
 
@@ -287,7 +287,7 @@ function functionDeclarationsEqual(actual, expected) {
 
 function testFunctionsFoundNoTrailingNewline() {
     let foundFuncs = parseScriptForFunctionNames("function f1() {}\n" +
-                                                 "function f2() {}\n");
+                                                 "function f2() {}");
     assertArrayEquals(foundFuncs,
                       [
                           { key: "f1:1:0", line: 1, n_params: 0 },


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