-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ga4-campaign-data
- Loading branch information
Showing
22 changed files
with
219 additions
and
156 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
const dedent = require('string-dedent') | ||
|
||
module.exports = { | ||
meta: { | ||
type: 'problem', | ||
docs: { | ||
description: 'This metric reports the number component that use Jest', | ||
recommended: true, | ||
url: null | ||
}, | ||
fixable: null, | ||
schema: [], | ||
messages: { | ||
percentage: dedent` | ||
Currently, {{percentage}}% of your components use Jest. We have {{totalKarmaTests}}% tests in Karma and {{totalJestTests}}% in Jest | ||
` | ||
} | ||
}, | ||
|
||
create: function (context) { | ||
return { | ||
'components/**/(test|__tests__)/*.(j|t)s(x)?': matches => { | ||
const totalTests = matches.length | ||
const totalJestTests = matches.filter(({fullPath}) => fullPath.includes('__tests__')).length | ||
const totalKarmaTests = totalTests - totalJestTests | ||
let percentage = (totalJestTests * 100) / totalTests | ||
percentage = Math.round((percentage + Number.EPSILON) * 100) / 100 | ||
|
||
context.report({ | ||
messageId: 'percentage', | ||
data: {percentage, totalKarmaTests, totalJestTests} | ||
}) | ||
return context.monitoring(percentage) | ||
}, | ||
|
||
missmatch: key => { | ||
context.report({ | ||
messageId: 'percentage', | ||
data: {percentage: 0} | ||
}) | ||
context.monitoring(0) | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
# CHANGELOG | ||
|
||
# 1.1.0 (2024-10-11) | ||
# 1.4.0 (2024-10-15) | ||
|
||
|
||
|
||
# 1.3.0 (2024-10-14) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* fix typo ([145ca42](https://github.com/SUI-Components/sui/commit/145ca427a72e411b10b86824b48b692be41c4d28)) | ||
|
||
|
||
### Features | ||
|
||
* Migrate sui-logger from inner source ([b2ac6ed](https://github.com/SUI-Components/sui/commit/b2ac6ed8ab0e12af0352ac62af88b99afef17b87)) | ||
* remove beta tag ([3b13263](https://github.com/SUI-Components/sui/commit/3b13263c125503dc16123677f62a376e11ac16fe)) | ||
* improve the documentation ([7db4964](https://github.com/SUI-Components/sui/commit/7db4964a5f8eb565cd0fb9105f8580e017868324)) | ||
|
||
|
||
|
||
# 1.2.0 (2024-10-14) | ||
|
||
|
||
|
||
# 1.1.0 (2024-10-11) | ||
|
||
|
||
### Features | ||
|
||
* Migrate sui-logger from inner source ([b2ac6ed](https://github.com/SUI-Components/sui/commit/b2ac6ed8ab0e12af0352ac62af88b99afef17b87)) | ||
* remove beta tag ([3b13263](https://github.com/SUI-Components/sui/commit/3b13263c125503dc16123677f62a376e11ac16fe)) |
Oops, something went wrong.