Categories
Mastering Development

Could not build wheels since package wheel is not installed

I am having this problem with wheels: ‘Could not build wheels for …, since package ‘wheel’ is not installed.’ with several packages and I have no idea what to do since – as you can see in the very end – I have installed the wheel package I am doing this on Ubuntu 18.04 I […]

Categories
Mastering Development

Insert new functionalitys in shiny

Friends, could you please help me with some issue involving shiny. My executable code is working and I inserted below. In my code I am using a predefined database. However, I inserted a shiny fileInput to search for the file on the computer, but I would like to relate it to my shiny server, so […]

Categories
Development

Jest test passes locally but fails in azure devops

I have a react application using react-scripts 3.2.0 This is my test : jest.mock(‘./../shared/utils/getRequestWithDispatchUsing’, () => ({ __esModule: true, default: () => () => () => () => ‘getRequestWithDispatchUsing is success’, })); describe(‘getContractsUsing’, () => { const dispatch = jest.fn(action => action); const fetch = jest.fn(); const clientNumber = ‘clientNumber’; beforeEach(() => { jest.clearAllMocks(); }); […]

Categories
Development

jest can’t produce coverage

I am in a react-native (expo SDK36) application , I have configured jest using the explanation from expo doc. This is how my jest configuration look like: { “jest”: { “testURL”: “http://localhost”, “preset”: “jest-expo”, “transformIgnorePatterns”: [ “node_modules/(?!(jest-)?react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|sentry-expo|native-base)” ], “coverageThreshold”: { “global”: { “statements”: 0, “branches”: 0, “functions”: 0, “lines”: 0 } }, “coveragePathIgnorePatterns”: [ “/node_modules/”, […]

Categories
Development

In Makefiles, how to display percentage of compilation followed by compiler’s warnings/errors

This is a bit tricky… I want my Makefile to display progression percentage of my compilation. This is easy as long as I use tput or escaped sequences to move my cursor to modify my percentage. But if a warning appears, the next warning will be on the previous one and so on… How can […]

Categories
Angular Development Plugins

Angular Jest or Jasmine Testing: How to Properly Spy/Mock a Static Object Called From Within a Tested Class?

I have an AppConfigService that loads an object from a JSON file into a static settings variable that is part of the service. Various components and/or services throughout the application reference the object with AppConfigService.settings., with a simple reference (no injection). How can I test a service that is referencing this kind of construction? For […]

Categories
Development

Nodejs / Gulp doesn’t copy all files to the ‘dist’ folder

Gulp should copy all sub-folders and files to the dist. But it copies only half of them, some folders will be ignored even if I change their names etc. (no special characters, same subfolder structure as the once that got copied correctly …) – nothing worked. I just can’t see any pattern in this. There […]

Categories
Development

how to make multiple selects with conditional aggregation

EDITED The query below gives me the avg of all type of coverage for 2019 given certain conditions, (note that the triplet: number, name and coverage make an element in the first select and the sum of those that are below 0 are excluded; I need to get the average of the price of those […]

Categories
Development

How Should VSCode Be Configured To Support A Lerna Monorepo?

I’m trying to achieve the following: Ensure that VSCode provides the correct import suggestions (based on package names, not on relative paths) Ensure that I can ‘Open Definition’ of one of these imports and be taken to the src of that file. My (lerna) monorepo is structured as standard, for example here is a ‘components’ […]

Categories
Ask

Jest with Babel-jest not compiling js in parent folders

I have a problem when i run jest from a folder and some file are in a parent directory. My repository seems like that : |-common | |-.babelrc | |-src | |-js | |-someDependencies.js |-app |-src | |-js | |-someCodeIncludingSomeDependencies.js |-.babelrc |-package.json |-webpack.config.js My Jest configuration is in package.json and is : “jest”: { “moduleNameMapper”: […]