We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4044b08 commit 4ae66abCopy full SHA for 4ae66ab
test/v1/tck/steps/environment.js
@@ -0,0 +1,24 @@
1
+var neo4j = require("../../../../lib/v1");
2
+
3
+module.exports = function () {
4
5
+ this.Before(function( scenario, callback ) {
6
+ this.driver = neo4j.driver("bolt://localhost");
7
+ this.session = this.driver.session();
8
+ if (findTag(scenario, '@reset_database')) {
9
+ this.session.run("MATCH (n) DETACH DELETE n").then( function( ) {
10
+ callback();
11
+ });
12
+ }
13
14
15
16
+ function findTag(scenario, tag) {
17
+ for (var i in scenario.getTags()) {
18
+ if (scenario.getTags()[i].getName() == tag) {
19
+ return true
20
21
22
+ return false;
23
24
+}
0 commit comments