mirror of
https://github.com/eleith/emailjs.git
synced 2024-07-05 20:10:37 +00:00
use super-fancy destructuring, because i can
This commit is contained in:
parent
557c480129
commit
8ccd20761b
@ -1,9 +1,11 @@
|
|||||||
describe('rfc2822 dates', function() {
|
describe('rfc2822 dates', function() {
|
||||||
const { expect } = require('chai');
|
const { expect } = require('chai');
|
||||||
const { date } = require('../email');
|
const {
|
||||||
|
date: { getRFC2822Date, getRFC2822DateUTC },
|
||||||
|
} = require('../email');
|
||||||
|
|
||||||
var d_utc = dt => date.getRFC2822DateUTC(new Date(dt));
|
var d_utc = dt => getRFC2822DateUTC(new Date(dt));
|
||||||
var d = (dt, utc = false) => date.getRFC2822Date(new Date(dt), utc);
|
var d = (dt, utc = false) => getRFC2822Date(new Date(dt), utc);
|
||||||
|
|
||||||
it('should match standard regex', function(done) {
|
it('should match standard regex', function(done) {
|
||||||
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
|
||||||
|
Loading…
Reference in New Issue
Block a user