mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 15:15:23 +03:00
chore: global code formatting
This commit is contained in:
1 parent
5bf94bc567
commit
bc44870665
830 files changed
+21075
-13592
No files matched your search
@@ -9,8 +9,8 @@ describe('objectArrayToData', () => {
|
||||
{ id: 2, name: 'Bob', age: 30 },
|
||||
];
|
||||
const sampleNestedData = [
|
||||
{ 'id': 1, 'info.name': 'Alice', 'info.age': 25 },
|
||||
{ 'id': 2, 'info.name': 'Bob', 'info.age': 30 },
|
||||
{ id: 1, 'info.name': 'Alice', 'info.age': 25 },
|
||||
{ id: 2, 'info.name': 'Bob', 'info.age': 30 },
|
||||
];
|
||||
const tableName = 'users';
|
||||
|
||||
@@ -32,7 +32,9 @@ INSERT INTO users (id, name, age) VALUES (2, 'Bob', 30);`);
|
||||
|
||||
it('should export XML format correctly', () => {
|
||||
const result = objectArrayToData(sampleData, 'xml', { tableName });
|
||||
expect(result).toBe('<root><id>1</id><name>Alice</name><age>25</age></root><root><id>2</id><name>Bob</name><age>30</age></root>');
|
||||
expect(result).toBe(
|
||||
'<root><id>1</id><name>Alice</name><age>25</age></root><root><id>2</id><name>Bob</name><age>30</age></root>',
|
||||
);
|
||||
});
|
||||
|
||||
it('should export CSV format correctly', () => {
|
||||
|
||||
Reference in new issue
Block a user