ipc: allow passing date instances
This commit is contained in:
parent
25156dbd53
commit
367d12402a
3 changed files with 33 additions and 15 deletions
|
@ -102,6 +102,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