Skip to content

Commit 5856a54

Browse files
committed
AG-4857 - integrated documentation tests with main config
1 parent fdd374a commit 5856a54

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const babelPresetGatsby = require('babel-preset-gatsby');
2+
13
const babelOptions = {
2-
presets: ['babel-preset-gatsby'],
4+
presets: [babelPresetGatsby],
35
};
46

57
module.exports = require('babel-jest').createTransformer(babelOptions);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { getPageName } from './get-page-name';
2+
3+
describe('getPageName', () => {
4+
it('returns page name', () => {
5+
expect(getPageName('/documentation/react/filter-set/')).toBe('filter-set');
6+
});
7+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import toKebabCase from './to-kebab-case';
2+
3+
describe('toKebabCase', () => {
4+
it('converts sentence case to kebab case', () => {
5+
expect(toKebabCase('Bubble With Negative Values')).toBe('bubble-with-negative-values');
6+
});
7+
});

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
2-
projects: ["<rootDir>/*-{modules,packages}/*/jest.config.js",],
2+
projects: [
3+
'<rootDir>/*-{modules,packages}/*/jest.config.js',
4+
'<rootDir>/grid-packages/ag-grid-docs/documentation/jest.config.js',
5+
],
36
};

0 commit comments

Comments
 (0)