Files
ihaleist/tests/document-content.test.mjs
T

8 lines
445 B
JavaScript

import {test} from 'node:test';
import assert from 'node:assert/strict';
import {documentContent} from '../server/document-content.mjs';
test('EKAP metin, upload text and plain string share the same reader',()=>{
for(const input of [{metin:'Şartname'},{text:'Şartname'},'Şartname']) assert.equal(documentContent(input),'Şartname');
assert.equal(documentContent(null),'');assert.equal(documentContent({metin:'',text:'İlan'}),'İlan');
});