Sanity tests for After Effects
DuSan requires DuAEF, the Duduf After Effects Framework. Two builds of the DuSan API are available:
DuSan_api.jsxinc
does not include DuAEF, and can be used to compine multiple Duduf APIs with a single copy of DuAEF.
Be careful to grab the right version of DuAEF in this case.DuAEF_DuSan_api.jsxinc
includes all dependencies, with DuAEF, and is easier to include in your scripts.
- Version:
- 2.0.5
- Copyright:
- 2022 Nicolas Dufresne, RxLaboratory
- License:
- GPL-3.0
DuSan is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DuSan is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DuSan. If not, see http://www.gnu.org/licenses/.
- GPL-3.0
Requires
- module:DuAEF>=1.0.0
Namespaces
Members
int
# static readonly Level
The sanity levels.
Properties:
Name | Type | Description |
---|---|---|
UNKNOWN |
int
|
|
OK |
int
|
|
INFO |
int
|
|
WARNING |
int
|
|
DANGER |
int
|
|
CRITICAL |
int
|
|
FATAL |
int
|
Methods
# static fix(test) → {DuSanity.Level}
Fixes the issues for the given test, if possible
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test to fix |
The level after the fix
# static init()
This function must be called once when everything in the script is ready and after
DuAEF.init
# static isEnabled(test) → {boolean}
Checks if a Sanity Test is enabled
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test |
boolean
# static isGloballyEnabled(test) → {boolean}
Checks if the fiven test is globally enabled
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test |
True if the test is enabled
boolean
# static isLiveFixEnabled(test) → {boolean}
Checks if the the live fix is enabled for the given test
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test |
True if the test live fix is enabled
boolean
# static isProjectEnabled(test) → {boolean}
Checks if the fiven test is enabled for the current project
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test |
True if the test is enabled for the current project
boolean
# static needsFix(test) → {boolean}
Checks if the fiven test needs a fix
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test to fix |
True if the test needs a fix
boolean
# static run(forceopt)
Runs all sanity tests
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
force |
boolean
|
<optional> |
false | Force running all tests even if they've not timed out yet. |
# static runTest(dontFixopt, forceopt) → {DuSanity.Level}
Runs a test
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
dontFix |
boolean
|
<optional> |
false | If false, will automatically fix the issue. |
force |
boolean
|
<optional> |
false | To improve performance, the test may be automatically paused. Set this to true to force it to run if calling this method. |
The level of the result of the test.
# static setEnabled(test, enabledopt)
Enables or disables the test
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
test |
DuSanity.Test
|
The test | ||
enabled |
boolean
|
<optional> |
true |
# static setGloballyEnabled(test, enabledopt)
Globally enables or disables the test
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
test |
DuSanity.Test
|
The test | ||
enabled |
boolean
|
<optional> |
true |
# static setLiveFixEnabled(test, enabledopt)
Enables or disables the live fix for the given test
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
test |
DuSanity.Test
|
The test | ||
enabled |
boolean
|
<optional> |
true |
# static setProjectEnabled(test, enabledopt)
Enables or disables the test for the current project only
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
test |
DuSanity.Test
|
The test | ||
enabled |
boolean
|
<optional> |
true |
# static setTimeOut(test, timeOut)
Sets the timeout for the test
Parameters:
Name | Type | Description |
---|---|---|
test |
DuSanity.Test
|
The test |
timeOut |
int
|
The time out in milliseconds. |