@@ -34,7 +34,8 @@ var assert = require("chai").assert,
34
34
leche = require ( "leche" ) ,
35
35
path = require ( "path" ) ,
36
36
parser = require ( "../../parser" ) ,
37
- shelljs = require ( "shelljs" ) ;
37
+ shelljs = require ( "shelljs" ) ,
38
+ tester = require ( "./tester" ) ;
38
39
39
40
//------------------------------------------------------------------------------
40
41
// Setup
@@ -48,15 +49,6 @@ var testFiles = shelljs.find(FIXTURES_DIR).filter(function(filename) {
48
49
return filename . substring ( FIXTURES_DIR . length - 1 , filename . length - 7 ) ; // strip off ".src.js"
49
50
} ) ;
50
51
51
- /**
52
- * Returns a raw copy of the given AST
53
- * @param {object } ast the AST object
54
- * @returns {object } copy of the AST object
55
- */
56
- function getRaw ( ast ) {
57
- return JSON . parse ( JSON . stringify ( ast ) ) ;
58
- }
59
-
60
52
//------------------------------------------------------------------------------
61
53
// Tests
62
54
//------------------------------------------------------------------------------
@@ -84,7 +76,7 @@ describe("attachComment: true", function() {
84
76
85
77
try {
86
78
result = parser . parse ( code , config ) ;
87
- result = getRaw ( result ) ;
79
+ result = tester . getRaw ( result ) ;
88
80
} catch ( ex ) {
89
81
90
82
// format of error isn't exactly the same, just check if it's expected
0 commit comments