This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { orm } from '@orm'; | |
// Other needed imports and operations... | |
describe('Block description', () => { | |
// Type error restoring the mock (mocking strategy #1)... | |
test('whatever test description.', async (done) => { | |
// Creating the spyOn... | |
jest.spyOn(orm.controllers, 'enableUserAccount') | |
// Mocking the function... | |
orm.controllers.enableUserAccount = jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logger from '@logger'; | |
import { | |
Resolver, | |
Query, | |
Arg | |
} from 'type-graphql'; | |
import Recipe from './recipe-type'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import log4js from 'log4js'; | |
var loggerConfiguration = { | |
appenders: { | |
console: { | |
type: 'console', | |
layout: { | |
type: 'pattern', | |
pattern: '[%r] (%35.35c) - [%[%5.5p%]] - %m%' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
GraphQLObjectType, | |
GraphQLInputObjectType, | |
GraphQLString, | |
GraphQLNonNull | |
} from 'graphql'; | |
var ObjectType = new GraphQLObjectType({ | |
name: 'PhoneNumber', | |
fields: () => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* TALLER DE ROBÓTICA Y PROGRAMACIÓN | |
* Día Mundial de la Mujer y la Niña en la Ciencia | |
* Colegio Salesiano San Juan Bosco de La Cuesta | |
* Febrero 2018 | |
* | |
* Uso de librerías para movel un motor servo. | |
*/ | |
#include <Servo.h> // Incluimos la librería "Servo". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* TALLER DE ROBÓTICA Y PROGRAMACIÓN | |
* Día Mundial de la Mujer y la Niña en la Ciencia | |
* Colegio Salesiano San Juan Bosco de La Cuesta | |
* Febrero 2018 | |
* | |
* Detección de nivel de voltaje analógico y conversión | |
* digital del mismo. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo servoDelantero; | |
Servo servoTrasero; | |
int pinServoDelantero = 5; | |
int pinServoTrasero = 6; | |
int posicionDelante = 45; | |
int posicionDetras = 135; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'jest'; | |
import * as graphql from 'graphql'; | |
import UserType from '../../../src/graphql/models/user.type'; | |
import * as PhoneNumberType from '../../../src/graphql/models/phone.number.type'; | |
import * as EmailAddressType from '../../../src/graphql/models/email.address.type'; | |
import TimestampType from '../../../src/graphql/custom-types/timestamp.type'; | |
describe('Testing UserType ...', () => { | |
test('Fields integrity.', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'jest'; | |
import * as graphql from 'graphql'; | |
import * as EmailAddressType from '../../../src/graphql/models/email.address.type'; | |
describe('Testing EmailAddressType ...', () => { | |
test('fields integrity when it is used as \'ObjectType\'.', () => { | |
let emailAddressFields = EmailAddressType.ObjectType.getFields(); | |
expect(emailAddressFields).toHaveProperty('email'); | |
expect(emailAddressFields.email.type).toMatchObject(new graphql.GraphQLNonNull(graphql.GraphQLString)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'jest'; | |
import * as graphql from 'graphql'; | |
import * as PhoneNumberType from '../../../src/graphql/models/phone.number.type'; | |
describe('Testing PhoneNumberType ...', () => { | |
test('fields integrity when it is used as \'ObjectType\'.', () => { | |
let phoneNumberFields = PhoneNumberType.ObjectType.getFields(); | |
expect(phoneNumberFields).toHaveProperty('number'); | |
expect(phoneNumberFields.number.type).toMatchObject(new graphql.GraphQLNonNull(graphql.GraphQLString)); |
NewerOlder