From 13dfaf6de3cf520c5423525693e954aefd8102f8 Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Thu, 20 Feb 2025 18:21:04 +0100 Subject: [PATCH] test: verify broken files --- app/lib/file-context/__tests__/file-context-spec.js | 12 ++++++------ .../__tests__/fixtures/broken-files/empty.bpmn | 0 .../__tests__/fixtures/broken-files/empty.dmn | 0 .../__tests__/fixtures/broken-files/empty.json | 0 .../__tests__/fixtures/broken-files/form-null.json | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 app/lib/file-context/__tests__/fixtures/broken-files/empty.bpmn create mode 100644 app/lib/file-context/__tests__/fixtures/broken-files/empty.dmn create mode 100644 app/lib/file-context/__tests__/fixtures/broken-files/empty.json create mode 100644 app/lib/file-context/__tests__/fixtures/broken-files/form-null.json diff --git a/app/lib/file-context/__tests__/file-context-spec.js b/app/lib/file-context/__tests__/file-context-spec.js index bfb48e6c60..34189e8914 100644 --- a/app/lib/file-context/__tests__/file-context-spec.js +++ b/app/lib/file-context/__tests__/file-context-spec.js @@ -168,7 +168,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); @@ -182,7 +182,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); @@ -198,7 +198,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); @@ -212,7 +212,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); @@ -226,7 +226,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); @@ -240,7 +240,7 @@ describe('FileContext', function() { // then expect(file).to.exist; - expect(file).to.have.property('type'); + expect(file.metadata).to.have.property('type'); }); }); diff --git a/app/lib/file-context/__tests__/fixtures/broken-files/empty.bpmn b/app/lib/file-context/__tests__/fixtures/broken-files/empty.bpmn new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/lib/file-context/__tests__/fixtures/broken-files/empty.dmn b/app/lib/file-context/__tests__/fixtures/broken-files/empty.dmn new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/lib/file-context/__tests__/fixtures/broken-files/empty.json b/app/lib/file-context/__tests__/fixtures/broken-files/empty.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/lib/file-context/__tests__/fixtures/broken-files/form-null.json b/app/lib/file-context/__tests__/fixtures/broken-files/form-null.json new file mode 100644 index 0000000000..19765bd501 --- /dev/null +++ b/app/lib/file-context/__tests__/fixtures/broken-files/form-null.json @@ -0,0 +1 @@ +null