Browse Source

fix Table.define, add test, remove npm-debug.log

dev
Gorgi Kosev 12 years ago
parent
commit
bf83963dd0
  1. 1
      lib/index.js
  2. 13
      test/index-tests.js
  3. 21
      test/npm-debug.log

1
lib/index.js

@ -6,6 +6,7 @@ function create(dialect) {
var sql = {
Table: Table,
define: function(def) {
if (!def.sql) def.sql = this;
return Table.define(def, this);
},
select: function() {

13
test/index-tests.js

@ -39,4 +39,17 @@ suite('index', function() {
});
test('sql.define for parallel dialects work independently', function() {
var mysql = sql.create('mysql');
var postgres = sql.create('postgres');
var mysqlTable = mysql.define({name: 'table', columns: ['column']});
var postgresTable = postgres.define({name: 'table', columns: ['column']});
assert.equal(mysqlTable.sql, mysql);
assert.equal(postgresTable.sql, postgres);
});
});

21
test/npm-debug.log

@ -1,21 +0,0 @@
0 info it worked if it ends with ok
1 verbose cli [ '/home/spion/.nvm/v0.10.10/bin/node',
1 verbose cli '/home/spion/.nvm/v0.10.10/bin/npm',
1 verbose cli 'test' ]
2 info using npm@1.2.25
3 info using node@v0.10.10
4 verbose read json /home/spion/Documents/node-sql/test/package.json
5 error Error: ENOENT, open '/home/spion/Documents/node-sql/test/package.json'
6 error If you need help, you may report this log at:
6 error <http://github.com/isaacs/npm/issues>
6 error or email it to:
6 error <npm-@googlegroups.com>
7 error System Linux 3.8.0-22-generic
8 error command "/home/spion/.nvm/v0.10.10/bin/node" "/home/spion/.nvm/v0.10.10/bin/npm" "test"
9 error cwd /home/spion/Documents/node-sql/test
10 error node -v v0.10.10
11 error npm -v 1.2.25
12 error path /home/spion/Documents/node-sql/test/package.json
13 error code ENOENT
14 error errno 34
15 verbose exit [ 34, true ]
Loading…
Cancel
Save