
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@qavajs/memory
Advanced tools
Unified test data storage for the @qavajs framework
npm install @qavajs/memory
The module resolves the provided value from storage
import memory from '@qavajs/memory';
When(/^save variable as '(.+)'$/, async function (key) {
memory.setValue(key, 42);
});
Then(/^value '(.+)' should be equal to '(.+)'$/, async function (variable1, variable2) {
const val = memory.getValue(variable1);
expect(val).to.equal(variable2);
});
When save variable as 'variable'
Then value of '$variable' should be equal to '42'
The module provides the capability to set constant values and computed (values that are calculated at the moment of call)
export default {
constant: 42,
now: function() {
return Date.now()
}
};
Before using memory, it needs to be registered. The best place to do it is Before hook
import memory from '@qavajs/memory';
import memoryMap from './memoryMap.js';
Before(async function() {
memory.register(memoryMap);
});
$$ can be escaped with a double backslash
When I expect text of 'Currency Label' to equal '\\$42'
In case you need to assign a unique value for each Cucumber thread and qavajs shard, you can use a parallel function.
It will assign value based on CUCUMBER_WORKER_ID and SHARD env variables.
import { parallel } from '@qavajs/memory/utils';
export default class Memory {
user = parallel([
{ username: 'user1', password: 'password' },
{ username: 'user2', password: 'password' }
]);
// shard mode
shardUser = parallel([
{ username: 'user1', password: 'password' },
{ username: 'user2', password: 'password' },
{ username: 'user3', password: 'password' },
{ username: 'user4', password: 'password' }
], { shard: true });
}
FAQs
memory package for @qavajs framework
The npm package @qavajs/memory receives a total of 2,349 weekly downloads. As such, @qavajs/memory popularity was classified as popular.
We found that @qavajs/memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.