Question: I'm using Cocos2d and looking to access a variable (CakesEaten) from another CCScene.

```
// in MainScene.h
@interface MainScene : CCScene{
    int CakesEaten;
}
@property int CakesEaten;

// in MainScene.m
@implementation
@synthesize CakesEaten;

// at the top of ScoreScreen.m
#import "MainScene.h"
// in the ScoreScreen.m init method
MainScene.CakesEaten = 9999

```

Gives an error of: Property "CakesEaten" not found on object of type MainScene. It's the only error that I receive when building.

Answer: 
`Application parameters` has a macros support (plus icon in the field). You need to use `$FilePathRelativeToProjectRoot$` macros.

This example runs `node /node_modules/.bin/wdio wdio.local.conf.js --spec foo.js`. `foo.js` is `$FilePathRelativeToProjectRoot$`

[![enter image description here](https://i.stack.imgur.com/Zbkp0.png)](https://i.stack.imgur.com/Zbkp0.png)
I appreciate the pain you're feeling. I have a similar desire. However, there may be a way to accomplish what you're trying to do without it. 

I'm using Webstorm + Jasmine for node development. Here are the steps I followed to get a working TDD setup:

1. install jasmine (Preferences->Frameworks & Frameworks->Node or just from cmd line).
2. setup test directory (eg, src/test or src/spec)
3. setup jasmine.json config file in root of test directory. Mine looks like this:

```js
{
  "spec_dir": "src/test",
  "spec_files": [ "**/*[sS]pec.js" ]
}

```

4. write a test file:

```js
describe('HelloWorld', function () {
  const HelloWorld = require('../HelloWorld');

  describe('#greeting', function() {
    it('should be friendly', function() {
      expect(new HelloWorld().greeting()).toEqual("Hello, World");
    });
  });
});

```

5. setup run/debug config: *default* node runner with options:

	* pick your node interpreter
	* node argument: node\_modules/jasmine/bin/jasmine.js
	* environment variable: JASMINE\_CONFIG\_PATH = src/test/jasmine.json (set in step 4 above)

	This produces an entry in the .idea/workspace.xml file like this:

```xml
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" node-parameters="node_modules/jasmine/bin/jasmine.js" working-dir="$PROJECT_DIR$">
   <envs>
     <env name="JASMINE_CONFIG_PATH" value="src/test/jasmine.json" />
   </envs>
</configuration>

```

6. Open any test file, and use the keyboard shortcut ctrl+shift+R. This will make a new temporary run config from the default node run config, but with the current test file filled in for the `Javascript file` option.

I've created a pretty fluid workflow with this setup. Considering that ctrl+R will re-run the last run config, you can be writing the test, use ctrl+shift+R to run it, then start writing the code, and use ctrl+R to re-run that same test file.