Best JavaScript code snippet using ts-auto-mock
dotenv.config.spec.ts
Source:dotenv.config.spec.ts
1const fsLibraryMock: typeof jest = jest.mock('fs');2import * as dotenv from 'dotenv';3import { DotEnvConfig } from './dotenv.config';4import { EnvConfig } from '../interfaces/envconfig.interface';5describe('-- DotEnvConfig --', () => {6 const envVars: EnvConfig = {7 DB_HOST: 'localhost',8 DB_NAME: 'database name',9 DB_SCHEMA: 'database schema',10 DB_PASSWORD: 'database password',11 DB_PORT: '5432',12 DB_USER: 'user',13 };14 // eslint-disable-next-line @typescript-eslint/no-var-requires15 const fsMock: any = require('fs');16 const fsReadSyncOptions = { encoding: 'utf8' };17 const invalidFile = 'invalid.env';18 const missingRequiredVariablesFile = 'missingRequiredVariables.env';19 const nonNumericPortFile = 'nonNumericPort.env';20 const validFile = 'valid.env';21 const testFiles: Map<string, string> = new Map<string, string>([22 [23 validFile,24 `DB_HOST=${envVars.DB_HOST}\n \25 DB_NAME=${envVars.DB_NAME}\n \26 DB_PORT=${envVars.DB_PORT}\n \27 DB_PASSWORD=${envVars.DB_PASSWORD}\n \28 DB_USER=${envVars.DB_USER}\n \29 DB_SCHEMA=${envVars.DB_SCHEMA}\n`,30 ],31 [missingRequiredVariablesFile, `DB_HOST=${envVars.DB_HOST}\n`],32 [33 nonNumericPortFile,34 `DB_HOST=${envVars.DB_HOST}\n \35 DB_NAME=${envVars.DB_NAME}\n \36 DB_PORT=port\n \37 DB_PASSWORD=${envVars.DB_PASSWORD}\n \38 DB_USER=${envVars.DB_USER}\n \39 DB_SCHEMA=${envVars.DB_SCHEMA}\n`,40 ],41 ]);42 afterAll(() => {43 fsLibraryMock.resetAllMocks();44 jest.resetModules();45 });46 beforeAll(() => {47 fsMock.__setMockFiles(testFiles);48 });49 beforeEach(() => {50 fsLibraryMock.clearAllMocks();51 });52 test('it should be defined with default values and db property values to be initially undefined', () => {53 const dotenvConfig: DotEnvConfig = new DotEnvConfig(validFile);54 expect(dotenvConfig).toBeDefined();55 expect(dotenvConfig.database).toBeUndefined();56 expect(dotenvConfig.host).toBeUndefined();57 expect(dotenvConfig.logging).toBeFalsy();58 expect(dotenvConfig.migrationsRun).toBeTruthy(); // running in test.env59 expect(dotenvConfig.name).toEqual('default');60 expect(dotenvConfig.password).toBeUndefined();61 expect(dotenvConfig.port).toBeUndefined();62 expect(dotenvConfig.schema).toBeUndefined();63 expect(dotenvConfig.synchronize).toBeFalsy();64 expect(dotenvConfig.type).toEqual('postgres');65 expect(dotenvConfig.username).toBeUndefined();66 expect(dotenvConfig.cli.entitiesDir).toEqual('src/course');67 expect(dotenvConfig.cli.migrationsDir).toEqual('src/database/migrations');68 expect(dotenvConfig.cli.subscribersDir).toBeUndefined();69 expect(dotenvConfig.entities.length).toEqual(1);70 expect(dotenvConfig.migrations.length).toEqual(2);71 });72 test('validate method should load values from dotenv file and set db property values', () => {73 const dotenvConfig: DotEnvConfig = new DotEnvConfig(validFile);74 expect(dotenvConfig).toBeDefined();75 const fileContent: string = testFiles.get(validFile);76 const parseMock = jest.spyOn(dotenv, 'parse');77 try {78 dotenvConfig.validate();79 expect(fsMock.readFileSync).toHaveBeenCalledTimes(1);80 expect(fsMock.readFileSync).toHaveBeenCalledWith(81 validFile,82 fsReadSyncOptions,83 );84 expect(fsMock.readFileSync).toHaveReturnedWith(fileContent);85 expect(parseMock).toHaveBeenCalledTimes(1);86 expect(parseMock).toHaveBeenCalledWith(fileContent);87 expect(parseMock).toHaveReturnedWith(envVars);88 expect(dotenvConfig.database).toEqual(envVars.DB_NAME);89 expect(dotenvConfig.host).toEqual(envVars.DB_HOST);90 expect(dotenvConfig.password).toEqual(envVars.DB_PASSWORD);91 expect(dotenvConfig.schema).toEqual(envVars.DB_SCHEMA);92 expect(dotenvConfig.username).toEqual(envVars.DB_USER);93 expect(dotenvConfig.port).toEqual(Number(envVars.DB_PORT));94 } finally {95 parseMock.mockRestore();96 }97 });98 test('error thrown when file does not exist', () => {99 const parseMock = jest.spyOn(dotenv, 'parse');100 try {101 const dotenvConfig: DotEnvConfig = new DotEnvConfig(invalidFile);102 expect(dotenvConfig).toBeDefined();103 expect(() => {104 dotenvConfig.validate();105 }).toThrow();106 expect(fsMock.readFileSync).toHaveBeenCalledTimes(1);107 expect(fsMock.readFileSync).toHaveBeenCalledWith(108 invalidFile,109 fsReadSyncOptions,110 );111 expect(fsMock.readFileSync).toThrow();112 expect(parseMock).not.toHaveBeenCalled();113 } finally {114 parseMock.mockRestore();115 }116 });117 test('error thrown when DB_PORT environment variable non numeric', () => {118 const expectedParseEnv: EnvConfig = {119 ...envVars,120 };121 const parseMock = jest.spyOn(dotenv, 'parse');122 const fileContent: string = testFiles.get(nonNumericPortFile);123 delete expectedParseEnv.DB_PORT;124 expectedParseEnv.DB_PORT = 'port';125 try {126 const dotenvConfig: DotEnvConfig = new DotEnvConfig(nonNumericPortFile);127 expect(dotenvConfig).toBeDefined();128 expect(() => {129 dotenvConfig.validate();130 }).toThrow();131 expect(fsMock.readFileSync).toHaveBeenCalledTimes(1);132 expect(fsMock.readFileSync).toHaveBeenCalledWith(133 nonNumericPortFile,134 fsReadSyncOptions,135 );136 expect(fsMock.readFileSync).toHaveReturnedWith(fileContent);137 expect(parseMock).toHaveBeenCalledTimes(1);138 expect(parseMock).toHaveBeenCalledWith(fileContent);139 expect(parseMock).toHaveReturnedWith(expectedParseEnv);140 } finally {141 parseMock.mockRestore();142 }143 });144 test('error thrown when required environment variables missing from dotenv file', () => {145 const parseMock = jest.spyOn(dotenv, 'parse');146 const expectedParseEnv: EnvConfig = {147 DB_HOST: 'localhost',148 };149 const fileContent: string = testFiles.get(missingRequiredVariablesFile);150 try {151 const dotenvConfig: DotEnvConfig = new DotEnvConfig(152 missingRequiredVariablesFile,153 );154 expect(dotenvConfig).toBeDefined();155 expect(() => {156 dotenvConfig.validate();157 }).toThrowError();158 expect(fsMock.readFileSync).toHaveBeenCalledTimes(1);159 expect(fsMock.readFileSync).toHaveBeenCalledWith(160 missingRequiredVariablesFile,161 fsReadSyncOptions,162 );163 expect(fsMock.readFileSync).toHaveReturnedWith(fileContent);164 expect(parseMock).toHaveBeenCalledTimes(1);165 expect(parseMock).toHaveBeenCalledWith(fileContent);166 expect(parseMock).toHaveReturnedWith(expectedParseEnv);167 } finally {168 parseMock.mockRestore();169 }170 });...
babel-plugin-dotenv-import_vx.x.x.js
Source:babel-plugin-dotenv-import_vx.x.x.js
1// flow-typed signature: bded219bfe1e564866800814f4c882b92// flow-typed version: <<STUB>>/babel-plugin-dotenv-import_v^1.3.1/flow_v0.67.03/**4 * This is an autogenerated libdef stub for:5 *6 * 'babel-plugin-dotenv-import'7 *8 * Fill this stub out by replacing all the `any` types.9 *10 * Once filled out, we encourage you to share your work with the11 * community by sending a pull request to:12 * https://github.com/flowtype/flow-typed13 */14declare module 'babel-plugin-dotenv-import' {15 declare module.exports: any;16}17/**18 * We include stubs for each file inside this npm package in case you need to19 * require those files directly. Feel free to delete any files that aren't20 * needed.21 */22declare module 'babel-plugin-dotenv-import/test/fixtures/as-alias/source' {23 declare module.exports: any;24}25declare module 'babel-plugin-dotenv-import/test/fixtures/blacklist/source' {26 declare module.exports: any;27}28declare module 'babel-plugin-dotenv-import/test/fixtures/custom-module/source' {29 declare module.exports: any;30}31declare module 'babel-plugin-dotenv-import/test/fixtures/default-import/source' {32 declare module.exports: any;33}34declare module 'babel-plugin-dotenv-import/test/fixtures/default/source' {35 declare module.exports: any;36}37declare module 'babel-plugin-dotenv-import/test/fixtures/filename/source' {38 declare module.exports: any;39}40declare module 'babel-plugin-dotenv-import/test/fixtures/from-env/source' {41 declare module.exports: any;42}43declare module 'babel-plugin-dotenv-import/test/fixtures/safe-error/source' {44 declare module.exports: any;45}46declare module 'babel-plugin-dotenv-import/test/fixtures/safe-success/source' {47 declare module.exports: any;48}49declare module 'babel-plugin-dotenv-import/test/fixtures/undefined/source' {50 declare module.exports: any;51}52declare module 'babel-plugin-dotenv-import/test/fixtures/unused/source' {53 declare module.exports: any;54}55declare module 'babel-plugin-dotenv-import/test/fixtures/variable-not-exist/source' {56 declare module.exports: any;57}58declare module 'babel-plugin-dotenv-import/test/fixtures/whitelist/source' {59 declare module.exports: any;60}61declare module 'babel-plugin-dotenv-import/test/fixtures/wildcard-import/source' {62 declare module.exports: any;63}64declare module 'babel-plugin-dotenv-import/test/test' {65 declare module.exports: any;66}67// Filename aliases68declare module 'babel-plugin-dotenv-import/index' {69 declare module.exports: $Exports<'babel-plugin-dotenv-import'>;70}71declare module 'babel-plugin-dotenv-import/index.js' {72 declare module.exports: $Exports<'babel-plugin-dotenv-import'>;73}74declare module 'babel-plugin-dotenv-import/test/fixtures/as-alias/source.js' {75 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/as-alias/source'>;76}77declare module 'babel-plugin-dotenv-import/test/fixtures/blacklist/source.js' {78 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/blacklist/source'>;79}80declare module 'babel-plugin-dotenv-import/test/fixtures/custom-module/source.js' {81 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/custom-module/source'>;82}83declare module 'babel-plugin-dotenv-import/test/fixtures/default-import/source.js' {84 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/default-import/source'>;85}86declare module 'babel-plugin-dotenv-import/test/fixtures/default/source.js' {87 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/default/source'>;88}89declare module 'babel-plugin-dotenv-import/test/fixtures/filename/source.js' {90 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/filename/source'>;91}92declare module 'babel-plugin-dotenv-import/test/fixtures/from-env/source.js' {93 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/from-env/source'>;94}95declare module 'babel-plugin-dotenv-import/test/fixtures/safe-error/source.js' {96 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/safe-error/source'>;97}98declare module 'babel-plugin-dotenv-import/test/fixtures/safe-success/source.js' {99 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/safe-success/source'>;100}101declare module 'babel-plugin-dotenv-import/test/fixtures/undefined/source.js' {102 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/undefined/source'>;103}104declare module 'babel-plugin-dotenv-import/test/fixtures/unused/source.js' {105 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/unused/source'>;106}107declare module 'babel-plugin-dotenv-import/test/fixtures/variable-not-exist/source.js' {108 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/variable-not-exist/source'>;109}110declare module 'babel-plugin-dotenv-import/test/fixtures/whitelist/source.js' {111 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/whitelist/source'>;112}113declare module 'babel-plugin-dotenv-import/test/fixtures/wildcard-import/source.js' {114 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/fixtures/wildcard-import/source'>;115}116declare module 'babel-plugin-dotenv-import/test/test.js' {117 declare module.exports: $Exports<'babel-plugin-dotenv-import/test/test'>;...
dotenv_vx.x.x.js
Source:dotenv_vx.x.x.js
1// flow-typed signature: 2fd250c42154688ff1c7b5092d4c5b172// flow-typed version: <<STUB>>/dotenv_v6.0.0/flow_v0.83.03/**4 * This is an autogenerated libdef stub for:5 *6 * 'dotenv'7 *8 * Fill this stub out by replacing all the `any` types.9 *10 * Once filled out, we encourage you to share your work with the11 * community by sending a pull request to:12 * https://github.com/flowtype/flow-typed13 */14declare module 'dotenv' {15 declare module.exports: any;16}17/**18 * We include stubs for each file inside this npm package in case you need to19 * require those files directly. Feel free to delete any files that aren't20 * needed.21 */22declare module 'dotenv/config' {23 declare module.exports: any;24}25declare module 'dotenv/lib/cli-options' {26 declare module.exports: any;27}28declare module 'dotenv/lib/main' {29 declare module.exports: any;30}31declare module 'dotenv/tests/test-cli-options' {32 declare module.exports: any;33}34declare module 'dotenv/tests/test-config-cli' {35 declare module.exports: any;36}37declare module 'dotenv/tests/test-config' {38 declare module.exports: any;39}40declare module 'dotenv/tests/test-parse' {41 declare module.exports: any;42}43// Filename aliases44declare module 'dotenv/config.js' {45 declare module.exports: $Exports<'dotenv/config'>;46}47declare module 'dotenv/lib/cli-options.js' {48 declare module.exports: $Exports<'dotenv/lib/cli-options'>;49}50declare module 'dotenv/lib/main.js' {51 declare module.exports: $Exports<'dotenv/lib/main'>;52}53declare module 'dotenv/tests/test-cli-options.js' {54 declare module.exports: $Exports<'dotenv/tests/test-cli-options'>;55}56declare module 'dotenv/tests/test-config-cli.js' {57 declare module.exports: $Exports<'dotenv/tests/test-config-cli'>;58}59declare module 'dotenv/tests/test-config.js' {60 declare module.exports: $Exports<'dotenv/tests/test-config'>;61}62declare module 'dotenv/tests/test-parse.js' {63 declare module.exports: $Exports<'dotenv/tests/test-parse'>;...
Using AI Code Generation
1import { Dotenv } from 'ts-auto-mock/dotenv';2Dotenv.config();3import { Dotenv } from 'ts-auto-mock/dotenv';4Dotenv.config();5import { Dotenv } from 'ts-auto-mock/dotenv';6Dotenv.config();7{8 "compilerOptions": {9 "plugins": [{ "transform": "ts-auto-mock/transform" }]10 }11}12{13 {14 "alias": {15 }16 }17 {18 "targets": {19 }20 }21}22module.exports = {23 module: {24 {25 options: {26 getCustomTransformers: () => ({27 require('ts-auto-mock/transform').default({28 }),29 }),30 },31 },32 },33};34module.exports = {35 transform: {
Using AI Code Generation
1import { Dotenv } from 'ts-auto-mock';2Dotenv.config();3import { Dotenv } from 'tsconfig-paths';4Dotenv.config();5import { Dotenv } from 'tsconfig-paths/register';6Dotenv.config();7import { Dotenv } from 'tsconfig-paths/register/ts-node';8Dotenv.config();9import { Dotenv } from 'tsconfig-paths/register/ts-node/register';10Dotenv.config();11import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register';12Dotenv.config();13import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register/ts-node/register';14Dotenv.config();15import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register';16Dotenv.config();17import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register';18Dotenv.config();19import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register';20Dotenv.config();21import { Dotenv } from 'tsconfig-paths/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register/ts-node/register';22Dotenv.config();
Using AI Code Generation
1import { Dotenv } from 'ts-auto-mock';2Dotenv.config();3Dotenv.config({ path: './.env' });4Dotenv.config({ path: './.env', debug: true });5Dotenv.config({ path: './.env', debug: true, override: true });6Dotenv.config({ path: './.env', debug: true, override: true, silent: true });7Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8' });8Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8', defaults: './.env.defaults' });9Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8', defaults: './.env.defaults', errorOnMissing: true });10Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8', defaults: './.env.defaults', errorOnMissing: true, errorOnExtra: true });11Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8', defaults: './.env.defaults', errorOnMissing: true, errorOnExtra: true, errorOnRegex: true });12Dotenv.config({ path: './.env', debug: true, override: true, silent: true, encoding: 'utf-8', defaults: './.env.defaults', errorOnMissing: true, errorOnExtra: true, errorOnRegex: true, expandVariables: true });
Using AI Code Generation
1import { createMock } from 'ts-auto-mock';2import { MyInterface } from './test2';3const mock: MyInterface = createMock<MyInterface>();4console.log(mock);5export interface MyInterface {6 id: number;7 name: string;8}9I have a .ts file that exports an array of objects. I want to import this array into another .ts file and use the objects within it. I am trying to use the following code:10 {11 },12 {13 },14];15import { myArray } from './test1';16for (const item of myArray) {17 console.log(item);18}19I have a .ts file that exports an array of objects. I want to import this array into another .ts file and use the objects within it. I am trying to use the following code:20 {21 },22 {23 },24];25import { myArray } from './test1';26for (const item of
Using AI Code Generation
1import { createMock } from 'ts-auto-mock';2import { MyClass } from './myclass';3describe('MyClass', () => {4 it('should mock MyClass', () => {5 const mock = createMock<MyClass>();6 expect(mock).toBeTruthy();7 expect(mock.myMethod()).toBe('myValue');8 });9});10import { createMock } from 'ts-auto-mock';11import { MyClass } from './myclass';12describe('MyClass', () => {13 it('should mock MyClass', () => {14 const mock = createMock<MyClass>();15 expect(mock).toBeTruthy();16 expect(mock.myMethod()).toBe('myValue');17 });18});19import { createMock } from 'ts-auto-mock';20import { MyClass } from './myclass';21describe('MyClass', () => {22 it('should mock MyClass', () => {23 const mock = createMock<MyClass>();24 expect(mock).toBeTruthy();25 expect(mock.myMethod()).toBe('myValue');26 });27});28import { createMock } from 'ts-auto-mock';29import { MyClass } from './myclass';30describe('MyClass', () => {31 it('should mock MyClass', () => {32 const mock = createMock<MyClass>();33 expect(mock).toBeTruthy();34 expect(mock.myMethod()).toBe('myValue');35 });36});37import { createMock } from 'ts-auto-mock';38import { MyClass } from './myclass';39describe('MyClass', () => {40 it('should mock MyClass', () => {41 const mock = createMock<MyClass>();42 expect(mock).toBeTruthy();43 expect(mock.myMethod()).toBe('myValue');44 });45});46import { createMock } from 'ts-auto-mock';47import { MyClass } from './myclass';48describe('MyClass', () => {49 it('should mock MyClass', () => {50 const mock = createMock<MyClass>();51 expect(mock).toBeTruthy();52 expect(mock.my
Using AI Code Generation
1import { Dotenv } from 'ts-auto-mock'2import { test } from './test'3describe('test', () => {4 it('test', () => {5 Dotenv.config()6 const result = test()7 expect(result).toBe('test')8 })9})10import { Dotenv } from 'ts-auto-mock'11import { test } from './test'12describe('test', () => {13 it('test', () => {14 Dotenv.config()15 const result = test()16 expect(result).toBe('test')17 })18})19import { Dotenv } from 'ts-auto-mock'20import { test } from './test'21describe('test', () => {22 it('test', () => {23 Dotenv.config()24 const result = test()25 expect(result).toBe('test')26 })27})28import { Dotenv } from 'ts-auto-mock'29import { test } from './test'30describe('test', () => {31 it('test', () => {32 Dotenv.config()33 const result = test()34 expect(result).toBe('test')35 })36})37import { Dotenv } from 'ts-auto-mock'38import { test } from './test'39describe('test', () => {40 it('test', () => {41 Dotenv.config()42 const result = test()43 expect(result).toBe('test')44 })45})46import { Dotenv } from 'ts-auto-mock'47import { test } from './test'48describe('test', () => {49 it('test', () => {50 Dotenv.config()51 const result = test()52 expect(result).toBe('test')53 })54})55import { Dotenv } from 'ts-auto-mock'56import { test } from './test'57describe('test', () => {58 it('test', () => {
Using AI Code Generation
1import { Dotenv } from 'ts-auto-mock/dotenv';2import { mock } from 'ts-auto-mock';3Dotenv.config();4const mock1 = mock<SomeInterface>();5import { Dotenv } from 'ts-auto-mock/dotenv';6import { mock } from 'ts-auto-mock';7Dotenv.config();8const mock2 = mock<SomeInterface>();9import { Dotenv } from 'ts-auto-mock/dotenv';10import { mock } from 'ts-auto-mock';11Dotenv.config();12const mock3 = mock<SomeInterface>();
Using AI Code Generation
1const { createMock } = require('ts-auto-mock');2const { mocked } = require('ts-jest/utils');3const { myFunction } = require('./test2');4const myFunctionMocked = mocked(myFunction);5jest.mock('./test2', () => {6 const originalModule = jest.requireActual('./test2');7 return {8 myFunction: jest.fn(),9 };10});11myFunctionMocked.mockReturnValue('I am a mock');12const result = myFunction(1, 2);13test('myFunction', () => {14 expect(result).toBe('I am a mock');15});16const { createMock } = require('ts-auto-mock');17const { mocked } = require('ts-jest/utils');18const { myFunction } = require('./test2');19const myFunctionMocked = mocked(myFunction);20jest.mock('./test2', () => {21 const originalModule = jest.requireActual('./test2');22 return {23 myFunction: jest.fn(),24 };25});26myFunctionMocked.mockReturnValue('I am a mock');27const result = myFunction(1, 2);28test('myFunction', () => {29 expect(result).toBe('I am a mock');30});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!