* Renaming GraphQL Types/Inputs * Add Native Type to avoid collision * Use pluralize for renaming * Fixing tests * Improve name collision management - tests passsing * Renaming few more default types * Rename file input * Reverting fields types to not collide with the relay spec types Improver users mutations * Adding ArrayResult to the reserved list * Fixing tests * Add more unit tests to ParseGraphQLSchema * Test transformClassNameToGraphQL * Name collision tests
12 lines
368 B
JavaScript
12 lines
368 B
JavaScript
const {
|
|
transformClassNameToGraphQL,
|
|
} = require('../lib/GraphQL/transformers/className');
|
|
|
|
describe('transformClassNameToGraphQL', () => {
|
|
it('should remove starting _ and tansform first letter to upper case', () => {
|
|
expect(
|
|
['_User', '_user', 'User', 'user'].map(transformClassNameToGraphQL)
|
|
).toEqual(['User', 'User', 'User', 'User']);
|
|
});
|
|
});
|