testeranto
Version:
the AI powered BDD test framework for typescript projects
114 lines (105 loc) • 2.98 kB
text/typescript
import { ITestSpecification } from "../../CoreTypes";
import { I, O } from "./core.test.types";
export const specification: ITestSpecification<I, O> = (
Suite,
Given,
When,
Then
) => {
const summary = {
suites: {
'Testeranto Core Functionality': {
features: {},
artifacts: []
},
'Testeranto Advanced Features': {
features: {},
artifacts: []
}
},
features: {},
artifacts: []
};
return [
Suite.Default(
"Testeranto Core Functionality",
summary.suites['Testeranto Core Functionality'],
{
// Initialization tests
defaultInitialization: Given.Default(
["Should initialize with default values"],
[],
[
Then.initializedProperly(),
Then.specsGenerated(),
Then.jobsCreated(),
Then.artifactsTracked()
]
),
customInputInitialization: Given.WithCustomInput(
{ test: "input" },
[],
[]
),
// Configuration tests
resourceConfig: Given.WithResourceRequirements(
{ ports: [3000, 3001] },
[],
[]
),
interfaceConfig: Given.WithCustomAdapter(
{
assertThis: (x) => !!x,
beforeEach: async (s, i) => i(),
},
[],
[]
),
// Core operations
specGeneration: Given.Default(
["Should generate test specs"],
[],
[]
),
jobCreation: Given.Default(
["Should create test jobs"],
[],
[]
),
artifactHandling: Given.Default(
["Should track artifacts"],
[],
[]
),
},
[]
),
Suite.ExtendedSuite("Testeranto Advanced Features", summary.suites['Testeranto Advanced Features'], {
// Error handling
errorPropagation: Given.Default(
["Should propagate errors properly"],
[],
[]
),
// Dynamic behavior
specModification: Given.Default(
["Should allow spec modification"],
[])],
[]
),
// Full lifecycle
testExecution: Given.Default(
["Should execute full test lifecycle"],
[],
[]
),
// Custom implementations
// Removed customImpl test since WithCustomImplementation isn't defined
dynamicSpecs: Given.Default(
["Should handle dynamic spec changes"],
[],
[]
),
}),
];
};