Even formatting to be the same

master
Raymonzut 5 years ago
parent ba2ca7cfdd
commit 7e5ccebcdf
No known key found for this signature in database
GPG Key ID: 97CF2D8BE2C69FC7
  1. 2
      src/App.vue
  2. 8
      src/components/aboutme.vue
  3. 14
      src/me.js
  4. 18
      test/me.js

@ -1,5 +1,5 @@
<template> <template>
<div id="app"> <div id='app'>
</div> </div>
</template> </template>

@ -5,9 +5,11 @@
Hi there, good to see you on my website. Hi there, good to see you on my website.
My name is Raymon Zutekouw({{ age }}). My name is Raymon Zutekouw({{ age }}).
Building software and exploring the wide variety of tools (or making them) is my passion. Building software and exploring the wide variety of tools (or making them) is my passion.
To see it in action, checkout the stuff I make on <a href="https://github.com/Raymonzut">GitHub</a>. To see it in action, checkout the stuff I make on
<a href='https://github.com/Raymonzut'>GitHub</a>.
The projects that may be useful to others are open source; for inspiring others and improving each others work. The projects that may be useful to others are open source; for inspiring others and improving each others work.
That is why I am a huge fan of <a href="https://www.gnu.org/philosophy/free-sw.en.html">free software</a>. That is why I am a huge fan of
<a href='https://www.gnu.org/philosophy/free-sw.en.html'>free software</a>.
</p> </p>
</div> </div>
</template> </template>
@ -20,7 +22,7 @@ export default {
computed: { computed: {
age: me.age age: me.age
} }
} };
</script> </script>
<style scoped> <style scoped>

@ -1,21 +1,21 @@
module.exports = { module.exports = {
age: age, age: age,
}; }
function age() { function age() {
let birthdate = new Date(2002, 8, 29); let birthdate = new Date(2002, 8, 29)
let now = new Date(); let now = new Date()
let age = now.getFullYear() - birthdate.getFullYear(); let age = now.getFullYear() - birthdate.getFullYear()
if (now.getMonth() < birthdate.getMonth()) { if (now.getMonth() < birthdate.getMonth()) {
age--; age--
} }
if ( if (
birthdate.getMonth() === now.getMonth() && birthdate.getMonth() === now.getMonth() &&
now.getDate() < birthdate.getDate() now.getDate() < birthdate.getDate()
) { ) {
age--; age--
} }
return age; return age
} }

@ -1,10 +1,10 @@
const assert = require("chai").assert; const assert = require('chai').assert
const me = require("../src/me"); const me = require('../src/me')
describe("me", () => { describe('me', () => {
describe("age", () => { describe('age', () => {
it("should return a positive number", () => { it('should return a positive number', () => {
assert.isAbove(me.age(), 0); assert.isAbove(me.age(), 0)
}); })
}); })
}); })

Loading…
Cancel
Save