@outliant/sunrise-utils 1.1.12 → 1.1.14

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.
@@ -341,6 +341,100 @@ describe('taskFieldFilter', function () {
341
341
  second_value: ''
342
342
  },
343
343
  output: null
344
+ },
345
+ {
346
+ input: {
347
+ condition: 'is_none_of',
348
+ field_id: '',
349
+ type: 'project_id',
350
+ field_type: 'text',
351
+ value: 'meow1;meow2',
352
+ second_value: ''
353
+ },
354
+ output: {
355
+ bool: {
356
+ must_not: [
357
+ {
358
+ bool: {
359
+ must: [
360
+ { term: { project_id: { value: 'meow1' } } }
361
+ ]
362
+ }
363
+ },
364
+ {
365
+ bool: {
366
+ must: [
367
+ { term: { project_id: { value: 'meow2' } } }
368
+ ]
369
+ }
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ },
375
+ {
376
+ input: {
377
+ condition: 'is_none_of',
378
+ field_id: '',
379
+ type: 'project_id',
380
+ field_type: 'text',
381
+ value: ['meow1', 'meow2'],
382
+ second_value: ''
383
+ },
384
+ output: {
385
+ bool: {
386
+ must_not: [
387
+ {
388
+ bool: {
389
+ must: [
390
+ { term: { project_id: { value: 'meow1' } } }
391
+ ]
392
+ }
393
+ },
394
+ {
395
+ bool: {
396
+ must: [
397
+ { term: { project_id: { value: 'meow2' } } }
398
+ ]
399
+ }
400
+ }
401
+ ]
402
+ }
403
+ }
404
+ },
405
+ {
406
+ input: {
407
+ condition: 'is_none_of',
408
+ field_id: '',
409
+ type: 'project_id',
410
+ field_type: 'text',
411
+ value: 'meow',
412
+ second_value: ''
413
+ },
414
+ output: {
415
+ bool: {
416
+ must_not: [
417
+ {
418
+ bool: {
419
+ must: [
420
+ { term: { project_id: { value: 'meow' } } }
421
+ ]
422
+ }
423
+ }
424
+ ]
425
+ }
426
+ }
427
+ },
428
+ {
429
+ input: {
430
+ condition: 'is_none_of',
431
+ field_id: '',
432
+ type: 'project_id',
433
+ field_type: 'text',
434
+ value: null,
435
+ second_value: ''
436
+ },
437
+ output: null
344
438
  }
345
439
  ];
346
440