Merge pull request #4515 from deepak1556/ipc_value_conversion_patch
ipc: allow passing date instances
This commit is contained in:
commit
a21e095a59
3 changed files with 20 additions and 15 deletions
|
@ -147,6 +147,15 @@ describe('ipc module', function() {
|
|||
});
|
||||
ipcRenderer.send('message', obj);
|
||||
});
|
||||
|
||||
it('can send instance of Date', function(done) {
|
||||
const currentDate = new Date();
|
||||
ipcRenderer.once('message', function(event, value) {
|
||||
assert.equal(value, currentDate.toISOString());
|
||||
done();
|
||||
});
|
||||
ipcRenderer.send('message', currentDate);
|
||||
});
|
||||
});
|
||||
|
||||
describe('ipc.sendSync', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue