Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe('test', function() {
- function CreateApple(type,color, width){
- this.type= type
- this.color=color;
- this.width=width;
- }
- CreateApple.prototype.eat= function(){
- return console.log("eat mniam, mniam");
- }
- CreateApple.prototype.height = 55;
- CreateApple.prototype.xxx={
- module1: 1,
- hhh: 2,
- tablice:{
- tab1: function(num){return num},
- tab2: 44,
- }
- }
- it('test1', function() {
- var apple1 = new CreateApple("goodone", "red", 34);
- apple1.eat();
- console.log(apple1.type);
- console.log(apple1.height);
- var ttt= apple1.xxx.hhh;
- var uuu= apple1.xxx.tablice.tab1(4);
- console.log(ttt+" "+uuu);
- });
- });
- require('../jgh/page4.js');
- describe('test', function() {
- it('test1', function() {
- var apple1 = new CreateApple("goodone", "red", 34);
- apple1.eat();
- console.log(apple1.type);
- console.log(apple1.height);
- var ttt= apple1.xxx.hhh;
- var uuu= apple1.xxx.tablice.tab1(4);
- console.log(ttt+" "+uuu);
- });
- });
- modules.exports =function CreateApple(type,color, width){
- this.type= type
- this.color=color;
- this.width=width;
- }
- CreateApple.prototype.eat= function(){
- return console.log("eat mniam, mniam");
- }
- CreateApple.prototype.height = 55;
- CreateApple.prototype.xxx={
- module1: 1,
- hhh: 2,
- tablice:{
- tab1: function(num){return num},
- tab2: 44,
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement