This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runat-1128988: mockCommands added json converters that we added to basic
I'm not clear why we thought that being able to display json was only something you'd want to do during testing, but since we later added them to the default set of converters, we don't need duplicates in test code. Signed-off-by: Joe Walker <[email protected]>
- Loading branch information
Showing
2 changed files
with
6 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,21 +45,10 @@ function createExec(name) { | |
mockCommands.items = [ | ||
{ | ||
item: 'converter', | ||
from: 'json', | ||
This comment has been minimized.
Sorry, something went wrong.
bgrins
|
||
to: 'string', | ||
exec: function(json, context) { | ||
return JSON.stringify(json, null, ' '); | ||
} | ||
}, | ||
{ | ||
item: 'converter', | ||
from: 'json', | ||
to: 'view', | ||
exec: function(json, context) { | ||
var html = JSON.stringify(json, null, ' ').replace(/\n/g, '<br/>'); | ||
return { | ||
html: '<pre>' + html + '</pre>' | ||
}; | ||
} | ||
}, | ||
{ | ||
|
1 comment
on commit 345fdda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+
I'm assuming you meant to get rid of the from: 'json' / to: 'dom' converter here?