Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package dependencies and Babel configurations #295

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
"lib"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.0.0",
"@istanbuljs/load-nyc-config": "^1.0.0",
"@istanbuljs/schema": "^0.1.2",
"istanbul-lib-instrument": "^5.0.4",
"test-exclude": "^6.0.0"
"@babel/helper-plugin-utils": "^7.24.7",
"@istanbuljs/load-nyc-config": "^1.1.0",
"@istanbuljs/schema": "^0.1.3",
"istanbul-lib-instrument": "^6.0.3",
"test-exclude": "^7.0.1"
},
"devDependencies": {
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
"@babel/plugin-transform-modules-commonjs": "^7.7.5",
"@babel/register": "^7.7.4",
"chai": "^4.2.0",
"coveralls": "^3.0.9",
"cross-env": "^6.0.3",
"mocha": "^6.2.2",
"nyc": "^15.0.0",
"@babel/cli": "^7.24.7",
"@babel/core": "^7.24.7",
"@babel/plugin-transform-modules-commonjs": "^7.24.7",
"@babel/register": "^7.24.6",
"chai": "^5.1.1",
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"mocha": "^10.6.0",
"nyc": "^17.0.0",
"pmock": "^0.2.3",
"standard": "^14.3.1"
"standard": "^17.1.0"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
Expand Down
33 changes: 17 additions & 16 deletions test/babel-plugin-istanbul.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import * as babel from '@babel/core'
import makeVisitor from '../src'
import path from 'path'

require('chai').should()

describe('babel-plugin-istanbul', function () {
before(async () => {
await import('chai').then(c => { c.should() })
})
context('Babel plugin config', function () {
it('should instrument file if shouldSkip returns false', function () {
var result = babel.transformFileSync('./fixtures/plugin-should-cover.js', {
const result = babel.transformFileSync('./fixtures/plugin-should-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -22,7 +23,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should not instrument file if shouldSkip returns true', function () {
var result = babel.transformFileSync('./fixtures/plugin-should-not-cover.js', {
const result = babel.transformFileSync('./fixtures/plugin-should-not-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -36,7 +37,7 @@ describe('babel-plugin-istanbul', function () {

context('local node_modules', function () {
it('should instrument file if shouldSkip returns false', function () {
var result = babel.transformFileSync('./fixtures/node_modules/should-cover.js', {
const result = babel.transformFileSync('./fixtures/node_modules/should-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -51,7 +52,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should not instrument file if shouldSkip returns true', function () {
var result = babel.transformFileSync('./fixtures/node_modules/should-not-cover.js', {
const result = babel.transformFileSync('./fixtures/node_modules/should-not-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -65,7 +66,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should call onCover callback', function () {
var args
let args
babel.transformFileSync('./fixtures/plugin-should-cover.js', {
babelrc: false,
configFile: false,
Expand All @@ -85,7 +86,7 @@ describe('babel-plugin-istanbul', function () {

context('source maps', function () {
it('should use inline source map', function () {
var result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
const result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -98,7 +99,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should not use inline source map if inputSourceMap is set to false', function () {
var result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
const result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -112,7 +113,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should use provided source map', function () {
var result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
const result = babel.transformFileSync('./fixtures/has-inline-source-map.js', {
babelrc: false,
configFile: false,
plugins: [
Expand Down Expand Up @@ -197,7 +198,7 @@ describe('babel-plugin-istanbul', function () {
context('package.json "nyc" config', function () {
context('process.env.NYC_CONFIG is set', function () {
it('should instrument file if shouldSkip returns false', function () {
var result = babel.transformFileSync('./fixtures/should-cover.js', {
const result = babel.transformFileSync('./fixtures/should-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -208,7 +209,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should not instrument file if shouldSkip returns true', function () {
var result = babel.transformFileSync('./fixtures/should-not-cover.js', {
const result = babel.transformFileSync('./fixtures/should-not-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -234,7 +235,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should instrument file if shouldSkip returns false', function () {
var result = babel.transformFileSync('./fixtures/should-cover.js', {
const result = babel.transformFileSync('./fixtures/should-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -245,7 +246,7 @@ describe('babel-plugin-istanbul', function () {
})

it('should not instrument file if shouldSkip returns true', function () {
var result = babel.transformFileSync('./fixtures/should-not-cover.js', {
const result = babel.transformFileSync('./fixtures/should-not-cover.js', {
babelrc: false,
configFile: false,
plugins: [
Expand Down Expand Up @@ -300,7 +301,7 @@ describe('babel-plugin-istanbul', function () {
context('regression tests', () => {
// regression test for https://github.com/istanbuljs/babel-plugin-istanbul/issues/78
it('should instrument: export const foo = () => {}', function () {
var result = babel.transformFileSync('./fixtures/issue-78.js', {
const result = babel.transformFileSync('./fixtures/issue-78.js', {
babelrc: false,
configFile: false,
plugins: [
Expand All @@ -314,7 +315,7 @@ describe('babel-plugin-istanbul', function () {

// regression test for https://github.com/istanbuljs/babel-plugin-istanbul/issues/201
it('should not conflict with transform-modules-commonjs', function () {
var result = babel.transformFileSync('./fixtures/issue-201.js', {
const result = babel.transformFileSync('./fixtures/issue-201.js', {
babelrc: false,
configFile: false,
plugins: [
Expand Down
Loading