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

2.1.3 #755

Merged
merged 12 commits into from
Nov 16, 2023
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/gruntlocalconf.json
composer.lock
package-lock.json
/_dev/node_modules
1 change: 1 addition & 0 deletions Tests/Unit/inc/classes/ImagifyUser/getError.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function testShouldReturnFalseWhenFetchedUserData() {
'consumed_current_month_quota' => 123,
'next_date_update' => '',
'is_active' => 1,
'is_monthly' => true,
];

Functions\when( 'get_imagify_user' )->justReturn( $userData );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function testShouldReturnQuotaWhenFetchedUserData() {
'consumed_current_month_quota' => 900, // Current consumed quota 90%.
'next_date_update' => '',
'is_active' => 1,
'is_monthly' => true,
];

Functions\when( 'get_imagify_user' )->justReturn( $userData );
Expand Down
3 changes: 3 additions & 0 deletions Tests/Unit/inc/classes/ImagifyUser/isOverQuota.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function testShouldReturnFalseWhenPaidAccount() {
'consumed_current_month_quota' => 123,
'next_date_update' => '',
'is_active' => 1,
'is_monthly' => true,
];

Functions\when( 'get_imagify_user' )->justReturn( $userData );
Expand All @@ -64,6 +65,7 @@ public function testShouldReturnFalseWhenFreeNotOverQuota() {
'consumed_current_month_quota' => 900, // Current consumed quota 90%.
'next_date_update' => '',
'is_active' => 1,
'is_monthly' => true,
];

$this->createMocks( $userData, 90 );
Expand All @@ -86,6 +88,7 @@ public function testShouldReturnTrueWhenFreeOverQuota() {
'consumed_current_month_quota' => 1000, // Current consumed quota 100%.
'next_date_update' => '',
'is_active' => 1,
'is_monthly' => true,
];

$this->createMocks( $userData, 100 );
Expand Down
20 changes: 20 additions & 0 deletions _dev/bud.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @typedef {import('@roots/bud').Bud} Bud
*
* @param {Bud} bud
*/
module.exports = async bud => {
bud.externals({
jQuery: 'window.jquery',
wp: 'window.wp',
})
bud.runtime('single')

await bud
.setPath('@dist', '../assets/admin')
.entry({
chart: 'chart.js',
bulk: 'bulk.js',
})
//.when( bud.isProduction, () => bud.splitChunks().minimize() )
}
15 changes: 15 additions & 0 deletions _dev/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "imagify_dev",
"version": "1.0.0",
"dependencies": {
},
"devDependencies": {
"@roots/bud": "^6.11.0",
"chart.js": "^4.4.0"
},
"scripts": {
"dev": "bud dev",
"build": "bud build",
"bud": "bud"
}
}
Loading
Loading