mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* tech: investigating karma + jest mix * tech: migrating tests to jest * tech: moved anoter test file to jest * test: migrated two more test files to jest * test: updated readme and made test fail to verify that it causes CI build failure * tech: added code coverage for jest tests * tech: testing codecov coverage * tech: migrated more tests * tech: migrated template srv to typescript and the tests to jest * tech: minor build fix * tech: build fixes * build: another attempt at fixing go test with coverage
23 lines
508 B
TypeScript
23 lines
508 B
TypeScript
import flatten from 'app/core/utils/flatten';
|
|
|
|
describe("flatten", () => {
|
|
|
|
it('should return flatten object', () => {
|
|
var flattened = flatten({
|
|
level1: 'level1-value',
|
|
deeper: {
|
|
level2: 'level2-value',
|
|
deeper: {
|
|
level3: 'level3-value'
|
|
}
|
|
}
|
|
}, null);
|
|
|
|
expect(flattened['level1']).toBe('level1-value');
|
|
expect(flattened['deeper.level2']).toBe('level2-value');
|
|
expect(flattened['deeper.deeper.level3']).toBe('level3-value');
|
|
});
|
|
|
|
});
|
|
|