frida-test 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # frida-test Documentation
2
2
 
3
+ [![Test frida-test](https://github.com/bernhste/frida-test/actions/workflows/test.yml/badge.svg)](https://github.com/bernhste/frida-test/actions/workflows/test.yml)
4
+
3
5
  This is a small test framework which runs on the target. It is used to unit test Frida code running on actual devices. It was originally developed to test the Frida agent code used in [frooky](https://github.com/cpholguera/frooky).
4
6
 
5
7
  The following chapters explain how to write and run tests.
@@ -10,7 +12,7 @@ The following chapters explain how to write and run tests.
10
12
  npm install --save-dev frida-test
11
13
  ```
12
14
 
13
- After the installation, import the type `frida-test` into you project by adding the following configuration to the `tsconfig.json`:
15
+ After the installation, import the type `frida-test` into your project by adding the following configuration to the `tsconfig.json`:
14
16
 
15
17
  ```json
16
18
  {
@@ -42,7 +44,7 @@ describe('Classloader', () => {
42
44
 
43
45
  Tests can be nested to any depth and can be synchronous or asynchronous.
44
46
 
45
- ### Test discovery
47
+ ### Test Discovery
46
48
 
47
49
  The framework collects every file matching `*.test.ts` in the directories passed on the command line, recursively.
48
50
 
@@ -84,7 +86,7 @@ myProject/
84
86
  | `.not.<matcher>` | Inverts the assertion result |
85
87
 
86
88
  > [!NOTE]
87
- > `frida-test` test itself. So for examples for all Matches and more, have a look a the `*.test.ts` located in the [test folder](./tests/)
89
+ > `frida-test` tests itself. So for examples of all matchers and more, have a look at the `*.test.ts` files located in the [test folder](./tests/).
88
90
 
89
91
  ### Setup and Teardown
90
92
 
@@ -169,7 +171,7 @@ frida-test -U -N org.owasp.mastestapp.MASTestApp-iOS ./tests/ios ./tests/shared
169
171
  frida-test -H 192.168.1.10:27042 --token secret -p 4926 ./tests/shared
170
172
  ```
171
173
 
172
- ## Compile Agent
174
+ ## Compiling the Agent
173
175
 
174
176
  `frida-test` automatically bundles the test suites and compiles them together with the testing framework into a Frida agent.
175
177
 
@@ -24,10 +24,10 @@ function printTestResult(node, depth = 0) {
24
24
  }
25
25
  export function printTestSuiteResult(suite) {
26
26
  if (suite.status == "failed") {
27
- logger.warn(`Test suite "${suite.name}" failed:`);
27
+ console.log(`❌ Test suite "${suite.name}" failed:`);
28
28
  }
29
29
  else if (suite.status == "passed") {
30
- logger.success(`Test suite "${suite.name}" passed:`);
30
+ console.log(`✅ Test suite "${suite.name}" passed:`);
31
31
  }
32
32
  if (suite.testResult) {
33
33
  printTestResult(suite.testResult, 1);
@@ -21,7 +21,7 @@ export function printSummary(runSummary) {
21
21
  console.log(chalk.bold("Test Suites"));
22
22
  for (const suite of testSuitesResults) {
23
23
  const isPassed = suite.status === "passed";
24
- console.log(` ${isPassed ? chalk.green("✓") : chalk.red("✗")} ${suite.name}`);
24
+ console.log(` ${isPassed ? "✅" : "❌"} ${suite.name}`);
25
25
  if (!isPassed && suite.testResult?.name) {
26
26
  for (const line of suite.testResult.name.split("\n")) {
27
27
  console.log(chalk.red(` ${line}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frida-test",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "license": "GPL-3.0-only",
6
6
  "homepage": "https://github.com/bernhste/frida-test/blob/main/README.md",