不要怂,就是干,撸起袖子干!

Commit 34bfda27 by Mick Hansen

Merge pull request #1593 from seegno/fix-test-object-output

Fix output of test arguments
2 parents 9885aca4 93e8afc6
...@@ -545,7 +545,7 @@ if (Support.dialectIsMySQL()) { ...@@ -545,7 +545,7 @@ if (Support.dialectIsMySQL()) {
_.each(suites, function(tests, suiteTitle) { _.each(suites, function(tests, suiteTitle) {
describe(suiteTitle, function() { describe(suiteTitle, function() {
tests.forEach(function(test) { tests.forEach(function(test) {
var title = test.title || 'MySQL correctly returns ' + test.expectation + ' for ' + util.inspect(test.arguments) var title = test.title || 'MySQL correctly returns ' + test.expectation + ' for ' + JSON.stringify(test.arguments)
it(title, function(done) { it(title, function(done) {
// Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly // Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly
var context = test.context || {options: {}}; var context = test.context || {options: {}};
......
...@@ -948,7 +948,7 @@ if (dialect.match(/^postgres/)) { ...@@ -948,7 +948,7 @@ if (dialect.match(/^postgres/)) {
}) })
tests.forEach(function(test) { tests.forEach(function(test) {
var title = test.title || 'Postgres correctly returns ' + test.expectation + ' for ' + util.inspect(test.arguments) var title = test.title || 'Postgres correctly returns ' + test.expectation + ' for ' + JSON.stringify(test.arguments)
it(title, function(done) { it(title, function(done) {
// Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly // Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly
var context = test.context || {options: {}}; var context = test.context || {options: {}};
......
...@@ -473,7 +473,7 @@ if (dialect === 'sqlite') { ...@@ -473,7 +473,7 @@ if (dialect === 'sqlite') {
_.each(suites, function(tests, suiteTitle) { _.each(suites, function(tests, suiteTitle) {
describe(suiteTitle, function() { describe(suiteTitle, function() {
tests.forEach(function(test) { tests.forEach(function(test) {
var title = test.title || 'SQLite correctly returns ' + test.expectation + ' for ' + util.inspect(test.arguments) var title = test.title || 'SQLite correctly returns ' + test.expectation + ' for ' + JSON.stringify(test.arguments)
it(title, function(done) { it(title, function(done) {
// Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly // Options would normally be set by the query interface that instantiates the query-generator, but here we specify it explicitly
var context = test.context || {options: {}}; var context = test.context || {options: {}};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!