mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
refactor: move remaining language examples to fixture files
This commit is contained in:
parent
44ceb8f1a0
commit
8c218e9edc
6 changed files with 89 additions and 0 deletions
26
tests/fixtures/languages/javascript/test.js
vendored
Normal file
26
tests/fixtures/languages/javascript/test.js
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Class definition
|
||||
class Person {
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
sayHello() {
|
||||
return `Hello, ${this.name}!`;
|
||||
}
|
||||
}
|
||||
|
||||
// Function declaration
|
||||
function greet(person) {
|
||||
return person.sayHello();
|
||||
}
|
||||
|
||||
// Variables and constants
|
||||
const DEFAULT_NAME = 'World';
|
||||
let currentPerson = new Person(DEFAULT_NAME);
|
||||
|
||||
// Export for use in other modules
|
||||
module.exports = {
|
||||
Person,
|
||||
greet,
|
||||
DEFAULT_NAME
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue