chore: Enfore consistent file-name casing on all backend packages (#15755)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-05-27 16:45:50 +02:00
committed by GitHub
parent 66d339c0d8
commit 3a2a70f193
152 changed files with 309 additions and 279 deletions

View File

@@ -0,0 +1,40 @@
/**
* @jest-environment jsdom
*/
import { booleanExtensions } from '@/extensions/boolean-extensions';
import { evaluate } from './helpers';
describe('Data Transformation Functions', () => {
describe('Boolean Data Transformation Functions', () => {
describe('Conversion methods', () => {
describe('toInt/toFloat', () => {
test('should return 1 for true, 0 for false', () => {
expect(evaluate('={{ (true).toInt() }}')).toEqual(1);
expect(evaluate('={{ (true).toFloat() }}')).toEqual(1);
expect(evaluate('={{ (false).toInt() }}')).toEqual(0);
expect(evaluate('={{ (false).toFloat() }}')).toEqual(0);
});
});
describe('toDateTime', () => {
test('should return undefined', () => {
expect(evaluate('={{ (true).toDateTime() }}')).toBeUndefined();
});
});
describe('toBoolean', () => {
test('should return itself', () => {
expect(evaluate('={{ (true).toDateTime() }}')).toBeUndefined();
});
});
test('should not have a doc (hidden from autocomplete)', () => {
expect(booleanExtensions.functions.toFloat.doc).toBeUndefined();
expect(booleanExtensions.functions.toBoolean.doc).toBeUndefined();
expect(booleanExtensions.functions.toDateTime.doc).toBeUndefined();
});
});
});
});