Importing local files in `jest.config.js` file

In my jest.config.js file, I need to populate globals property. For populating the globals property I need to require local modules, as shown below: const path = require(‘path’) const server = require(‘./server/cfg’) module.exports = { rootDir: path.resolve(__dirname), moduleFileExtensions: [ ‘js’, ‘json’, ‘vue’, ‘ts’ ], moduleNameMapper: { ‘^@/(.*)$’: ‘<rootDir>/src/$1’ }, transform: { “.*\\.(vue)$”: “<rootDir>/node_modules/vue-jest”, “^.+\\.(js|jsx)?$”: “<rootDir>/node_modules/babel-jest”,…

Details

When proxying an array, and accessing the map function, why is the array’s constructor checked?

I’m creating a proxy of an array, and then calling .map on the proxy to iteratively retrieve the elements in the target array: const proxiedArray = new Proxy([…], { get: function(target, prop) { console.log(target, prop) // This is just to see what properties I’m retrieving return target[prop] } }) proxiedArray.map(el => …) Surprisingly, The log…

Details

How to check if my ARM64 board supports 32 bit binary compilation? (error: unrecognized command line option ‘-m32’)

I have a ARM virtual machine on AWS with Ubuntu18.04 installed. dpkg & uname commands show this, $ dpkg –print-architecture arm64 $ uname -m aarch64 I’ve got a third-party precompiled static library (.a) built for 32-bit. I understand that I cannot link 32-bit library to a 64-bit application, so I’ve created a new application which…

Details