Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boobst Installation #14

Open
farooqsaeedfs opened this issue Aug 19, 2015 · 6 comments
Open

boobst Installation #14

farooqsaeedfs opened this issue Aug 19, 2015 · 6 comments

Comments

@farooqsaeedfs
Copy link

I am getting the following error while executing this command:

$ npm install boobst
npm WARN install Refusing to install boobst as a dependency of itself

'npm install mocha' works fine. But when I am running 'npm test' it's giving me following errors:

  1. set "after each" hook:
    Error: timeout of 1000ms exceeded. Ensure the done() callback is being call
    ed in this test.

  2. zn #zn test simple switching should properly switch between namespaces:
    Uncaught AssertionError: {} == null
    at null.callback (c:\boobst-master\boobst-master\test\test.zn.js:47:20)
    at BoobstSocket.onDataZn (c:\boobst-master\boobst-master\boobst.js:328:18)

  at onData (c:\boobst-master\boobst-master\boobst.js:130:9)
  at Socket.<anonymous> (_stream_readable.js:765:14)
  at emitReadable_ (_stream_readable.js:427:10)
  at emitReadable (_stream_readable.js:423:5)
  at readableAddChunk (_stream_readable.js:166:9)
  at Socket.Readable.push (_stream_readable.js:128:10)
  at TCP.onread (net.js:529:21)
  1. zn "after each" hook:
    Uncaught AssertionError: {} == null
    at null.callback (c:\boobst-master\boobst-master\test\test.zn.js:47:20)
    at onClose (c:\boobst-master\boobst-master\boobst.js:87:19)
    at TCP.close (net.js:466:12)

npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0

@agsh
Copy link
Owner

agsh commented Aug 19, 2015

Hello! Tests have not worked for a long time because I can not find any useful cache' server.
But did you get boobst directory in your node_modules directory with two main files boobst.js and boobst.m?

@farooqsaeedfs
Copy link
Author

I just did. So I copied paste boobst directory in node_module along with folders 'assert' and 'mocha' and both of these folders got their own node_module.

And in boobst directory I got package.json, boobst.m, boobst.js and test.js. In test.js I wrote the following code:

var BoobstSocket = require('boobst').BoobstSocket
, assert = require('assert')
;

var bs = new BoobstSocket({
host: 'my Server IP'
, port: 6666
});
bs.connect(function(err){
var test = 'test';
// 'this' refers to the socket itself
this.zn('MY NameSpace').set('^test', [1, 2], test).get('^test', [1, 2], function(err, data) {
assert.equal(data, test, 'should be "' + test + '"');
this.disconnect();
});
});
bs.set('a', '2')
.set('b', '2')
.execute('testbst^boobst' /_program body: "w a_b q"/, function(err, data) {
if (err) { console.log(err); return; }
console.log(data === '4' ? 'successfully executed': 'something wrong');
});

testbst^boobst This tag and routine exists and contains following code in it:
S ^TMP("FAR",1)="Test"
w a*b q

I am trying to run this test,js using 'npm test'. I am receiving same error as I stated above and my global ^TMP("FAR",1) not effecting at all.

@farooqsaeedfs
Copy link
Author

By the way I changed test.config.js as well; as per my host and ns.

@farooqsaeedfs
Copy link
Author

Thanks for the response I was able to run using 'express'. I can see the output now.

@agsh
Copy link
Owner

agsh commented Aug 20, 2015

So for now it works as expected? Or there are still some questions?

@farooqsaeedfs
Copy link
Author

The issue I am facing right now is passing parameters to a tag in a routine. The code I am calling is

this.set('a', '2')
.set('b', '2')
.execute('testbst^boobst', function(err, data) {
if (err) { console.log(err); return; }
console.log(data === '4' ? 'successfully executed': 'something wrong');
});

And the error I am getting is:
[Error:
S ^TMP("FAR",2)="Test"$J":"_a
^
testbst+1^boobst *a]

Seems like values are not passing to the tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants