Google now ban this type of attachment from Gmail
According to the Google, '.js' files are increasingly being used to spread malware. Gmail currently restricts certain file attachments (e.g. .exe, .msc, and .bat) for security reasons.
Now starting of February 13, 2017, Gmail users would not allow .js file attachments as well. Similar to other restricted file attachments.
Google also mentions that for inbound mails, the senders will be receiving a bounce message explaining them why the mail was blocked and was not sent.