@nachocab/pipedream-global 2.0.39 → 2.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nachocab/pipedream-global",
3
- "version": "2.0.39",
3
+ "version": "2.0.40",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -435,6 +435,29 @@ En la sesión del día 30 de noviembre seguiremos con nuestra clase de`,
435
435
  ]);
436
436
  });
437
437
 
438
+ it('ignores URGENT markers', function () {
439
+ const emailBody = `
440
+ @nombre: @nacho Nivel: Avanzado Día: 1-11-2020 hora: 17:30 Zona: Europe/Madrid Título: Traducciones a la vista Agenda: Buscaremos los equivalentes más naturales === URGENT @nombre: @nacho Nivel: Avanzado Día: 8-11-2020 hora: 18:30 Zona: Europe/Madrid Título: Traducciones a la vista 2 Agenda: Buscaremos los equivalentes más naturales ===`;
441
+ expect(parseClassEmail(emailBody)).to.eql([
442
+ {
443
+ teacherUsername: 'nacho',
444
+ classLevelName: 'avanzado',
445
+ scheduledFor: '2020-11-01T17:30',
446
+ timeZone: 'Europe/Madrid',
447
+ classTitle: 'Traducciones a la vista',
448
+ classDescription: 'Buscaremos los equivalentes más naturales',
449
+ },
450
+ {
451
+ teacherUsername: 'nacho',
452
+ classLevelName: 'avanzado',
453
+ scheduledFor: '2020-11-08T18:30',
454
+ timeZone: 'Europe/Madrid',
455
+ classTitle: 'Traducciones a la vista 2',
456
+ classDescription: 'Buscaremos los equivalentes más naturales',
457
+ },
458
+ ]);
459
+ });
460
+
438
461
  it('handles English', function () {
439
462
  const emailBody = `@username: @Kevin
440
463
  Day: 21-10-2021
@@ -449,7 +472,7 @@ En la sesión del día 30 de noviembre seguiremos con nuestra clase de`,
449
472
  scheduledFor: '2021-10-21T18:30',
450
473
  timeZone: 'America/Chicago',
451
474
  classTitle: 'Vocab',
452
- classDescription: `Blah blah\n`,
475
+ classDescription: 'Blah blah\n',
453
476
  },
454
477
  ]);
455
478
  });
@@ -9,6 +9,11 @@ const {
9
9
 
10
10
  describe('reshape', function () {
11
11
  describe('nestedArrayToArrayOfObjects', function () {
12
+ it('works when empty', function () {
13
+ const objectOfArrays = nestedArrayToArrayOfObjects([]);
14
+ expect(objectOfArrays).to.eql([]);
15
+ });
16
+
12
17
  // default google sheets values
13
18
  it('works', function () {
14
19
  const objectOfArrays = nestedArrayToArrayOfObjects([