[AAE-11496] - Make aca-shared and aca-folder-rules buidlable (#2851)

* [AAE-11496] Fix aca-shared build

* Add build option to aca-folder-rules

* Add small test for aos
This commit is contained in:
Bartosz Sekuła
2022-12-20 19:21:22 +01:00
committed by GitHub
parent e570ef8da0
commit c5951edccf
19 changed files with 231 additions and 131 deletions

View File

@@ -26,8 +26,23 @@
import * as app from './app.rules';
import { TestRuleContext } from './test-rule-context';
import { NodeEntry } from '@alfresco/js-api';
import { getFileExtension } from './app.rules';
describe('app.evaluators', () => {
describe('getFileExtension', () => {
it('should return no extension when input is null', () => {
expect(getFileExtension(null)).toBe(null);
});
it('should extract file extension', () => {
expect(getFileExtension('test.docx')).toBe('docx');
});
it('should not extract file extension', () => {
expect(getFileExtension('unknown')).toBe(null);
});
});
describe('canDownloadSelection', () => {
it('should return [false] if selection is empty', () => {
const context = new TestRuleContext();